8000 Merge pull request #16 from iangreenleaf/clear_token · angular-oauth/angular-oauth@6873570 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6873570

Browse files
committed
Merge pull request #16 from iangreenleaf/clear_token
Add `clear` to Token to allow forgetting
2 parents db9c283 + 0a8794d commit 6873570

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/js/angularOauth.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ angular.module('angularOauth', []).
9898
localStorage[config.localStorageName] = accessToken;
9999
},
100100

101+
/**
102+
* Forgets the access token.
103+
*/
104+
clear: function() {
105+
localStorage.removeItem(config.localStorageName);
106+
},
107+
101108
/**
102109
* Verifies that the access token is was issued for the use of the current client.
103110
*

0 commit comments

Comments
 (0)
0