-
Notifications
You must be signed in to change notification settings - Fork 97
TokenEndpoint handlers
Saleem Ansari edited this page May 28, 2014
·
1 revision
As defined in TokenEndpoint.scala you can define these different kinds of authorization phases:
authorization_code
refresh_token
client_credentials
password
Note that when you make a POST
request to your OAuth2 controller, you have to provide any of the above strings as is. For example:
$ wget -q -O - --post-data "grant_type=password&client_id=client1&client_secret=secret1&username=user1&password=pass1" http://localhost:9002/oauth2/access_token | python -mjson.tool
{
"access_token": "MzE3YWI5MTUtZWEwNy00OTU1LTgyMTQtZmE2ZjBlMzQwYzYx",
"expires_in": 3600,
"refresh_token": "NmRmYjg1NzItMzc0YS00YTgzLTk0OWItMmFjNjQxM2U1NjFk",
"scope": "",
"token_type": "Bearer"
}