From 0a8794d59e955bcd46ba6ffed219a244973d340c Mon Sep 17 00:00:00 2001 From: Ian Young Date: Mon, 24 Feb 2014 16:28:22 -0800 Subject: [PATCH] Add `clear` to Token to allow forgetting --- src/js/angularOauth.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/js/angularOauth.js b/src/js/angularOauth.js index d244c63..eb73a9f 100644 --- a/src/js/angularOauth.js +++ b/src/js/angularOauth.js @@ -98,6 +98,13 @@ angular.module('angularOauth', []). localStorage[config.localStorageName] = accessToken; }, + /** + * Forgets the access token. + */ + clear: function() { + localStorage.removeItem(config.localStorageName); + }, + /** * Verifies that the access token is was issued for the use of the current client. *