Hi Vinod, I also tested the same with IS 5.1.0 fresh pack and could not reproduce your scenario. The grant types is a space separated string. If you create the OAuth app from management console, for each grant type you have selected with the checkboxes, it will add something like "authorization_code implicit password client_credentials refresh_token" to the GRANT_TYPES column of IDN_OAUTH_CONSUMER_APPS table.
Can you please share more details about the environment and the request you have used to create applications. Thanks, TharinduE On Thu, Mar 17, 2016 at 5:40 PM, Maduranga Siriwardena <[email protected]> wrote: > Hi Vinod, > > I have used OAuthAdminService to register an OAuth application and I was > able to save the grant types properly. > > Any grant type is not allowed by default. If client_credentials is not > included in the grant types list you will not be able to use that grant > type to generate an access token. > > Bellow is the Soap request I used to register the application. > > <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsd="http://org.apache.axis2/xsd" xmlns:xsd1=" > http://dto.oauth.identity.carbon.wso2.org/xsd"> > <soapenv:Header/> > <soapenv:Body> > <xsd:registerOAuthApplicationData> > <xsd:application> > <xsd1:OAuthVersion>OAuth-2.0</xsd1:OAuthVersion> > <xsd1:applicationName>test</xsd1:applicationName> > <xsd1:callbackUrl> > https://localhost:9443/services/OAuthAdminService</xsd1:callbackUrl> > <xsd1:grantTypes>authorization_code implicit</xsd1:grantTypes> > </xsd:application> > </xsd:registerOAuthApplicationData> > </soapenv:Body> > </soapenv:Envelope> > > Thanks, > Maduranga. > > On Thu, Mar 17, 2016 at 4:36 PM, Vinod Kavinda <[email protected]> wrote: > >> Hi, >> I'm trying to register an oAuth client using OAuthAdminService. I'm >> sending the grant types string with the request. I have checked the table >> "IDN_OAUTH_CONSUMER_APPS", the grant types column is always NULL. >> >> But, I could generate access tokens with client_credentials grant type. >> Is it because by default all types are allowed? >> >> Am I missing something here? How can I set the specific set of grant >> types? >> >> I'm using IS 5.0.1. Appreciate your feedback on this. >> >> >> Regards, >> Vinod >> >> -- >> Vinod Kavinda >> Software Engineer >> *WSO2 Inc. - lean . enterprise . middleware <http://www.wso2.com>.* >> Mobile : +94 (0) 712 415544 >> Blog : http://soatechflicks.blogspot.com/ >> >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Maduranga Siriwardena > Software Engineer > WSO2 Inc. > > email: [email protected] > mobile: +94718990591 > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Tharindu Edirisinghe Software Engineer | WSO2 Inc Platform Security Team Blog : tharindue.blogspot.com mobile : +94 775181586
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
