Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Merge pull request #303 from doktordirk/doc-fix
Browse files Browse the repository at this point in the history
doc(baseConfig): fix getExpirationDateFromResponse sample
  • Loading branch information
doktordirk committed Nov 17, 2016
2 parents 11d4d96 + 60836ae commit 0699230
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions doc/baseConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ storage = 'localStorage';
storageKey = 'aurelia_authentication';
// full page reload if authorization changed in another tab (recommended to set it to 'true')
storageChangedReload = false;
// optional function to extract the expiration date. Takes the server response as parameter and returns number of seconds! since 1 January 1970 00:00:00 UTC (Unix Epoch)
// eg (expires_in in sec): getExpirationDateFromResponse = serverResponse => new Date().getTime() + serverResponse.expires_in / 1000;
// optional function to extract the expiration date. Takes the server response as parameter and returns NumericDate = number of seconds! since 1 January 1970 00:00:00 UTC (Unix Epoch)
// eg (expires_in in sec): getExpirationDateFromResponse = serverResponse => new Date().getTime() / 1000 + serverResponse.expires_in;
getExpirationDateFromResponse = null;
// optional function to extract the access token from the response. Takes the server response as parameter and returns a token
// eg: getAccessTokenFromResponse = serverResponse => serverResponse.data[0].access_token;
Expand Down
4 changes: 2 additions & 2 deletions src/baseConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ export class BaseConfig {
storageKey = 'aurelia_authentication';
// full page reload if authorization changed in another tab (recommended to set it to 'true')
storageChangedReload = false;
// optional function to extract the expiration date. Takes the server response as parameter and returns number of seconds! since 1 January 1970 00:00:00 UTC (Unix Epoch)
// eg (expires_in in sec): getExpirationDateFromResponse = serverResponse => new Date().getTime() + serverResponse.expires_in * 1000;
// optional function to extract the expiration date. Takes the server response as parameter and returns NumericDate = number of seconds! since 1 January 1970 00:00:00 UTC (Unix Epoch)
// eg (expires_in in sec): getExpirationDateFromResponse = serverResponse => new Date().getTime() / 1000 + serverResponse.expires_in;
getExpirationDateFromResponse = null;
// optional function to extract the access token from the response. Takes the server response as parameter and returns a token
// eg: getAccessTokenFromResponse = serverResponse => serverResponse.data[0].access_token;
Expand Down

0 comments on commit 0699230

Please sign in to comment.