Skip to content

Commit

Permalink
additonal yuidoc
Browse files Browse the repository at this point in the history
  • Loading branch information
amkirwan committed Aug 8, 2015
1 parent 27953df commit 1e62daa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/ember-oauth2.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ export default Ember.Object.extend(Ember.Evented, {
* The key name to use for saving state to localstorage
*
* @method stateKeyName
* @return {String} The state key name used for localstorage
*/
stateKeyName: function() {
return this.get('statePrefix') + '-' + this.get('state');
Expand All @@ -358,6 +359,7 @@ export default Ember.Object.extend(Ember.Evented, {
* The key name to use for saving the token to localstorage
*
* @method tokenKeyName
* @return {String} The token key name used for localstorage
*/
tokenKeyName: function() {
return this.get('tokenPrefix') + '-' + this.get('providerId');
Expand All @@ -379,6 +381,10 @@ export default Ember.Object.extend(Ember.Evented, {

/**
* remove the state from localstorage
*
* @method removeState
* @param {String} stateName The keyname of the state object in localstorage
* @return {Object} The deleted state object from localstorage
*/
removeState: function(stateName) {
if (stateName) {
Expand All @@ -390,6 +396,9 @@ export default Ember.Object.extend(Ember.Evented, {

/**
* remove the token from localstorage
*
* @method removeToken
* @return {Object} The token object in localstorage
*/
removeToken: function() {
return window.localStorage.removeItem(this.tokenKeyName());
Expand Down

0 comments on commit 1e62daa

Please sign in to comment.