-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(0.4.1): add custom login support
- Loading branch information
Peter John
committed
May 15, 2015
1 parent
9faee83
commit 69c83f8
Showing
5 changed files
with
83 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,17 @@ exchangeCode(code) | |
``` | ||
atleast once. After this you can make any requests as the user has to be authenticated first. | ||
|
||
## 3. Custom Login Flow using JWT(JSON Web Token) | ||
```js | ||
var token = Playlyfe.createJWT({ | ||
client_id: 'your client_id', | ||
client_secret: 'your client_secret', | ||
player_id: 'johny', // The player id associated with your user | ||
scopes: ['player.runtime.read', 'player.runtime.write'], // The scopes the player has access to | ||
expires: 3600; // 1 hour | ||
}) | ||
``` | ||
This is used to create jwt token which can be created when your user is authenticated. This token can then be sent to the frontend and or stored in your session. With this token the user can directly send requests to the Playlyfe API as the player. | ||
|
||
# Documentation | ||
You can initiate a client by giving the client_id and client_secret params | ||
|
@@ -183,7 +194,7 @@ This is thrown whenever an error occurs in each call. The Error contains the `na | |
|
||
License | ||
======= | ||
Playlyfe NodeJS SDK v0.4.0 | ||
Playlyfe NodeJS SDK v0.4.1 | ||
http://dev.playlyfe.com/ | ||
Copyright(c) 2013-2014, Playlyfe IT Solutions Pvt. Ltd, [email protected] | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters