Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0a8794d

Browse files
committed
Add clear to Token to allow forgetting
1 parent 5eb25e1 commit 0a8794d

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)