Hi all,
As discussed in [1], I split generate keys operation into 2, and added
"provide-keys" operation for semi-manual client registration. Here is the
final list with sample requests and responses.
POST /applications/{applicationId}/generate-keys
{
"keyType": "PRODUCTION",
"grantTypesToBeSupported": [
"client-credentials", "password"
],
"callbackUrl": "http://localhost/callback"}
Response
{
"consumerKey": "xxxxxxxxxxxxxxxxxx",
"consumerSecret": "yyyyyyyyyyyyyyyyyyy",
"supportedGrantTypes": [
"client-credentials", "password"
],
"callbackUrl": "http://localhost/callback",
"keyType": "PRODUCTION"}
POST /applications/{applicationId}/provide-keys
{
"consumerKey": "xxxxxxxxxxxxxxxxxxxx",
"consumerSecret": "yyyyyyyyyyyyyyyyyyy",
"keyType": "PRODUCTION"}
Response
{
"consumerKey": "xxxxxxxxxxxxxxxxxx",
"consumerSecret": "yyyyyyyyyyyyyyyyyyy",
"supportedGrantTypes": [
"client-credentials", "password"
],
"callbackUrl": "http://localhost/callback",
"keyType": "PRODUCTION"}
POST /applications/{applicationId}/generate-tokens
{
"consumerKey": "xxxxxxxxxxxxxxxxxxxxx",
"consumerSecret": "yyyyyyyyyyyyyyyyyyyyyy",
"validityPeriod": 3600,
"scopes": "read write delete",
"revokeToken": "zzzzzzzzzzzzzzzzzzzzz"}
Response
{
"accessToken": "aaaaaaaaaaaaaaaaaaaaaaaaa",
"tokenScopes": "read write",
"validityTime": 3600}
[1] [APIM][C5] Splitting "Generate Keys" operation in Store REST API
Thanks,
--
*Bhathiya Jayasekara*
*Associate Technical Lead,*
*WSO2 inc., http://wso2.com <http://wso2.com>*
*Phone: +94715478185*
*LinkedIn: http://www.linkedin.com/in/bhathiyaj
<http://www.linkedin.com/in/bhathiyaj>*
*Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>*
*Blog: http://movingaheadblog.blogspot.com
<http://movingaheadblog.blogspot.com/>*
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture