Yes, that's what I was suggesting. From the UI it looks like its a single operation, but behind the scenes we need to be doing 2 (or more) REST calls to get this working.
On Wed, Jun 21, 2017 at 9:45 AM, Bhathiya Jayasekara <[email protected]> wrote: > > On Wed, Jun 21, 2017 at 8:01 AM, Malintha Amarasinghe <[email protected]> > wrote: > >> Hi, >> >> If we are generating keys and creating an app at the same time (from the >> UI with 2 REST calls), I guess we will need to have a separate option at >> the app creation page itself for "Providing keys". Maybe a checkbox >> "Provide keys" which enables two text boxes to specify consumer key and >> secret as well? Then UI can decide whether it should call "generate keys" >> operation or "provide keys" operation secondly. >> > > Yes we need something like that when we design the UI. > > Thanks, > Bhathiya > > >> >> Thanks! >> >> On Tue, Jun 20, 2017 at 7:44 PM, Nuwan Dias <[email protected]> wrote: >> >>> We need to have two resources for generating keys and generating a >>> token. The user experience (UI) should be such that when you create an >>> application you automatically create the consumer key and consumer secret >>> too. So the UI will have to make two calls, POST /application and POST >>> /generate-keys when you create an Application. Generating a token could of >>> course be an optional thing. >>> >>> On Tue, Jun 20, 2017 at 2:57 PM, Chamin Dias <[email protected]> wrote: >>> >>>> Suggested method looks good. +1. >>>> >>>> On Tue, Jun 20, 2017 at 2:50 PM, Uvindra Dias Jayasinha < >>>> [email protected]> wrote: >>>> >>>>> +1 >>>>> >>>>> On 20 June 2017 at 14:47, Bhathiya Jayasekara <[email protected]> >>>>> wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> In the current implementation of store REST API, we have a single >>>>>> operation (aka. Generate Keys) to create OAuth application and generate >>>>>> access tokens, which requires 2 calls to key manager. IMO, if we split >>>>>> this >>>>>> operation into 2, the code becomes cleaner. On the other hand, the >>>>>> current >>>>>> implementation makes the code of out of band client registation[1] a bit >>>>>> complex as we don't have a way to only generate access tokens after >>>>>> providing keys explicitly. >>>>>> >>>>>> so, to make the code cleaner, I'm suggesting to split this "Generate >>>>>> Keys" operation into 2 as, >>>>>> >>>>>> 1) Create OAuth application (i.e. generate consumer key/secret) >>>>>> 2) Generate access tokens. >>>>>> >>>>>> If we do this, in the case of out-of-band client provisioning we can >>>>>> simply replace step 1 with "Provide Keys" call. >>>>>> >>>>>> In UI, there will be 2 buttons as "Generate Keys/Provide Keys" which >>>>>> generates or allows to add consumer key/secret, and "Generate Access >>>>>> Token" >>>>>> which generates application access token. >>>>>> >>>>>> Please let me know if you have any concerns about this. >>>>>> >>>>>> [1] https://docs.wso2.com/display/AM210/Provisioning+Out-of-Band >>>>>> +OAuth+Clients >>>>>> >>>>>> Thanks, >>>>>> -- >>>>>> *Bhathiya Jayasekara* >>>>>> *Associate Technical Lead,* >>>>>> *WSO2 inc., http://wso2.com <http://wso2.com>* >>>>>> >>>>>> *Phone: +94715478185 <+94%2071%20547%208185>* >>>>>> *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/>* >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Regards, >>>>> Uvindra >>>>> >>>>> Mobile: 777733962 >>>>> >>>>> _______________________________________________ >>>>> Dev mailing list >>>>> [email protected] >>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>> >>>>> >>>> >>>> >>>> -- >>>> Chamin Dias >>>> Mobile : 0716097455 <071%20609%207455> >>>> Email : [email protected] >>>> LinkedIn : https://www.linkedin.com/in/chamindias >>>> >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> [email protected] >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >>> >>> -- >>> Nuwan Dias >>> >>> Software Architect - WSO2, Inc. http://wso2.com >>> email : [email protected] >>> Phone : +94 777 775 729 <+94%2077%20777%205729> >>> >>> _______________________________________________ >>> Dev mailing list >>> [email protected] >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Malintha Amarasinghe >> Software Engineer >> *WSO2, Inc. - lean | enterprise | middleware* >> http://wso2.com/ >> >> Mobile : +94 712383306 <071%20238%203306> >> > > > > -- > *Bhathiya Jayasekara* > *Associate Technical Lead,* > *WSO2 inc., http://wso2.com <http://wso2.com>* > > *Phone: +94715478185 <+94%2071%20547%208185>* > *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/>* > -- Nuwan Dias Software Architect - WSO2, Inc. http://wso2.com email : [email protected] Phone : +94 777 775 729
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
