Hi Ayesh, It is great to see that you go through the code. Additionally, you can also check out the latest m1 release of API Manager [1]. CLI tool is targeting for the C5 based API Manager.
I have already shared the below information in the dev mailing list in order to get some idea about the API Manager m1 release and how you can access the REST API. Very recently we released WSO2 API Manager 3.0.0-m1 [1] which is based on > Carbon 5(C5) and you can try out the product. If you encounter any issues > or if you like to contribute to the project, please do send us a PR. With > the new approach, our publisher and store apps are based on the REST API > and you can use the REST API for the CLI as well. > For you to get the idea on available APIs, you can do the following. > 1. Start the API Manager 3.0.0-m1 pack. > 2. We have separate REST APIs and one for the publisher and one for the > store. You can use the following URLs to access the swagger.json of the > APIs. > - Publisher : http://localhost:9090/api/am/publisher/v1/apis/swagger.json > - Store : http://localhost:9090/api/am/store/v1/apis/swagger.json > 3. You can use swagger editor [2] to view the relevant APIs. > *How to access the REST API* > 1. Retrieve application consumer key and secret > curl -X POST -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: > application/json" -d '{"redirect_uris":[null]," > clientName":"Test","ext_param_owner":"ADMIN"}' "http://localhost:9090/ > keyserver/register" > 2. Retrieve application access token using key and secret > curl -X POST -H "Authorization: Bearer {base64 encoded key:secret}" -H > "Content-Type: application/x-www-form-urlencoded" -d > 'grant_type=password&username=Smith&password=Smith&validity_period=3600' " > http://localhost:9090/keyserver/token" > 3. Use the token to access the REST API resources > curl -X GET -H 'Content-Type: application/json' -H 'Authorization: Bearer > {token}' http://127.0.0.1:9090/api/am/publisher/v1/apis > [1] - https://github.com/wso2/product-apim/releases/tag/v3.0.0-m1 > [2] - http://editor.swagger.io Thank you! On Mon, Mar 6, 2017 at 7:41 PM, Ayeshmantha Perera <[email protected]> wrote: > Hi Pubudu > > Went through the basic key concepts of the WSO2 API Manager and went > through the token generation Documentation And the specification doc of > OAuth 2 protocol to get more idea on how it will be used in the task on > token generation.And went through the code of Dynamic client registration > class(dcr)[1] and .And yeah for the time been proposed a solution on Token > generation task [2]. > > [1] https://github.com/wso2/carbon-apimgt/blob/master/compon > ents/apimgt/org.wso2.carbon.apimgt.rest.api.dcr/src/main/ > java/org/wso2/carbon/apimgt/rest/api/dcr/web/impl/Registra > tionServiceImpl.java#L12 > <https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.rest.api.dcr/src/main/java/org/wso2/carbon/apimgt/rest/api/dcr/web/impl/RegistrationServiceImpl.java#L126> > > [2] http://gsocproposal8.blogspot.com/2017/02/task-4-key-gen > eration-solution-proposed.html > > Thank you > Best regards > Ayesh > > On Mon, Mar 6, 2017 at 6:10 AM, Ayeshmantha Perera < > [email protected]> wrote: > >> Hi All >> >> Went through the basic key concepts of the WSO2 API Manager and went >> through the token generation Documentation And the specification doc of >> OAuth 2 protocol to get more idea on how it will be used in the task on >> token generation.And went through the code of Dynamic client registration >> class(dcr)[1] and .And yeah for the time been proposed a solution on Token >> generation task [2]. >> >> [1] https://github.com/wso2/carbon-apimgt/blob/master/compon >> ents/apimgt/org.wso2.carbon.apimgt.rest.api.dcr/src/main/ >> java/org/wso2/carbon/apimgt/rest/api/dcr/web/impl/Registra >> tionServiceImpl.java#L12 >> <https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.rest.api.dcr/src/main/java/org/wso2/carbon/apimgt/rest/api/dcr/web/impl/RegistrationServiceImpl.java#L126> >> >> [2] http://gsocproposal8.blogspot.com/2017/02/task-4-key-gen >> eration-solution-proposed.html >> > > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Pubudu Gunatilaka* Committer and PMC Member - Apache Stratos Software Engineer WSO2, Inc.: http://wso2.com mobile : +94774078049 <%2B94772207163>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
