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

Commit

Permalink
feat(refresh-token): optional refreshTokenUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
doktordirk committed May 23, 2016
1 parent eac4b3f commit 234e102
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/authService.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ export class AuthService {
client_id: this.config.clientId ? this.config.clientId : undefined
};

this.client.post(this.config.withBase(this.config.loginUrl), content)
this.client.post(this.config.withBase(this.config.refreshTokenUrl
? this.config.refreshTokenUrl
: this.config.loginUrl), content)
.then(response => {
this.authentication.responseObject = response;
this.authentication.resolveUpdateTokenCallstack(this.authentication.isAuthenticated());
Expand Down
2 changes: 2 additions & 0 deletions src/baseConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ export class BaseConfig {
unlinkUrl = '/auth/unlink/';
// The HTTP method used for 'unlink' requests (Options: 'get' or 'post')
unlinkMethod = 'get';
// The API endpoint to which refreshToken requests are sent. null = loginUrl
refreshTokenUrl = null;


// Token Options
Expand Down

0 comments on commit 234e102

Please sign in to comment.