Client Credentials
- Client credentials includes client_id and client_secrete
- Client credentials are generated by IAdea console whenever an app is registered to it
- Client id is named by app’s package name plus serial number such as “com.iadea.player.00000001”
- Serial numbers are one-to-one mapping to intent uri data for a package
- Client secret is randomly generated for a new client id and should not be changed later
- Android app can obtain client credential from intent message
- Javascript application can obtain its client client credential when running inside IAdea browser while the active location and start location have the same origin
Request with password for full control permission
POST /v2/oauth2/token HTTP/1.1
Host: player_ip
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
client_id=client_id& (optional)
client_secrete=client_secrete& (optional)
grant_type=password&
username=admin&
password=password
Request without password for client permission
POST /v2/oauth2/token HTTP/1.1
Host: player_ip
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
client_id=client_id&
client_secrete=client_secrete&
grant_type=client_credentials
Successful Response
OAuth 2.0 : Successful Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: no-store
Pragma: no-cache
{
“access_token”: “access_token”,
“token_type”: ”Bearer”,
“expires_in”: 86400,
“refresh_token”: “refresh_token” (if requested by password with client_id and client_secrete)
}
Comments
0 comments
Please sign in to leave a comment.