Re: [Dev] Any available module for jaggery to get oAuth tokens?

2015-04-28 Thread Ruchira Wageesha
On Tue, Apr 28, 2015 at 2:16 PM, Dulitha Wijewantha 
wrote:

> Yeah, that's the service URL to get tokens, but I am looking for an api to
> get the tokens. Since there is no such API available, shall I improve the
> oAuth module to perform this function?
>
+1, but don't couple it into any API Manager specific codes. If you have to
do so, then come up with a new module.

>
> On Fri, Apr 24, 2015 at 7:33 PM, Madusanka Premaratne  > wrote:
>
>> Hi Dulitha,
>> You can call to https://localhost:8243/token to get both refresh_token
>> and access_token
>> Have a look at the following curl command
>> curl -k -d "grant_type=password&username=admin&password=admin" -H
>> "Authorization: Basic
>> bmU5X015dDNKWGxuTDRNWjhrbnlFdDM3cGRvYTpTSEtCOTZoX0RjeGVlMnQ0eG9JZlhMUERRRHdh,
>> Content-Type: application/x-www-form-urlencoded"
>> https://localhost:8243/token
>>
>> Thanks,
>> Madusanka
>>
>> On Fri, Apr 24, 2015 at 5:14 PM, Dulitha Wijewantha 
>> wrote:
>>
>>> Hi guys,
>>> Is there are any available module for jaggery (or Java) that can be
>>> called to obtain oAuth 2 tokens from API Manager? I looked into the oauth
>>> module [1] in jaggery but it doesn't seem to return refresh tokens.
>>>
>>> My use-case is to obtain access/refresh tokens for Password/SAML Grant
>>> Type from a Jaggery app.
>>>
>>> [1] -
>>> https://github.com/wso2/jaggery-extensions/blob/master/oauth/resources/org.jaggeryjs.modules.oauth/src/main/java/org/jaggeryjs/modules/oauth/OAuthHostObject.java
>>>
>>> Cheers~
>>>
>>> --
>>> Dulitha Wijewantha (Chan)
>>> Software Engineer - Mobile Development
>>> WSO2 Inc
>>> Lean.Enterprise.Middleware
>>>  * ~Email   duli...@wso2.com *
>>> *  ~Mobile +94712112165 <%2B94712112165>*
>>> *  ~Website   dulitha.me *
>>> *  ~Twitter @dulitharw *
>>>   *~Github @dulichan *
>>>   *~SO @chan *
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Madusanka Premaratne* | Associate Software Engineer
>> WSO2, Inc | lean. enterprise. middleware.
>> #20, Palm Grove, Colombo 03, Sri Lanka
>> Mobile: +94 71 835 70 73| Work: +94 112 145 345
>> Email: madusan...@wso2.com | Web: www.wso2.com
>>
>> [image: Facebook]  [image: Twitter]
>>  [image: Google Plus]
>>  [image:
>> Linkedin]  [image: Instagram]
>>  [image: Skype]
>> 
>>
>>
>
>
> --
> Dulitha Wijewantha (Chan)
> Software Engineer - Mobile Development
> WSO2 Inc
> Lean.Enterprise.Middleware
>  * ~Email   duli...@wso2.com *
> *  ~Mobile +94712112165 <%2B94712112165>*
> *  ~Website   dulitha.me *
> *  ~Twitter @dulitharw *
>   *~Github @dulichan *
>   *~SO @chan *
>



-- 

*Ruchira Wageesha**Technical Lead*
*WSO2 Inc. - lean . enterprise . middleware |  wso2.com *

*email: ruch...@wso2.com ,   blog:
ruchirawageesha.blogspot.com ,
mobile: +94 77 5493444*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Any available module for jaggery to get oAuth tokens?

2015-04-28 Thread Dulitha Wijewantha
Yeah, that's the service URL to get tokens, but I am looking for an api to
get the tokens. Since there is no such API available, shall I improve the
oAuth module to perform this function?

On Fri, Apr 24, 2015 at 7:33 PM, Madusanka Premaratne 
wrote:

> Hi Dulitha,
> You can call to https://localhost:8243/token to get both refresh_token
> and access_token
> Have a look at the following curl command
> curl -k -d "grant_type=password&username=admin&password=admin" -H
> "Authorization: Basic
> bmU5X015dDNKWGxuTDRNWjhrbnlFdDM3cGRvYTpTSEtCOTZoX0RjeGVlMnQ0eG9JZlhMUERRRHdh,
> Content-Type: application/x-www-form-urlencoded"
> https://localhost:8243/token
>
> Thanks,
> Madusanka
>
> On Fri, Apr 24, 2015 at 5:14 PM, Dulitha Wijewantha 
> wrote:
>
>> Hi guys,
>> Is there are any available module for jaggery (or Java) that can be
>> called to obtain oAuth 2 tokens from API Manager? I looked into the oauth
>> module [1] in jaggery but it doesn't seem to return refresh tokens.
>>
>> My use-case is to obtain access/refresh tokens for Password/SAML Grant
>> Type from a Jaggery app.
>>
>> [1] -
>> https://github.com/wso2/jaggery-extensions/blob/master/oauth/resources/org.jaggeryjs.modules.oauth/src/main/java/org/jaggeryjs/modules/oauth/OAuthHostObject.java
>>
>> Cheers~
>>
>> --
>> Dulitha Wijewantha (Chan)
>> Software Engineer - Mobile Development
>> WSO2 Inc
>> Lean.Enterprise.Middleware
>>  * ~Email   duli...@wso2.com *
>> *  ~Mobile +94712112165 <%2B94712112165>*
>> *  ~Website   dulitha.me *
>> *  ~Twitter @dulitharw *
>>   *~Github @dulichan *
>>   *~SO @chan *
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Madusanka Premaratne* | Associate Software Engineer
> WSO2, Inc | lean. enterprise. middleware.
> #20, Palm Grove, Colombo 03, Sri Lanka
> Mobile: +94 71 835 70 73| Work: +94 112 145 345
> Email: madusan...@wso2.com | Web: www.wso2.com
>
> [image: Facebook]  [image: Twitter]
>  [image: Google Plus]
>  [image:
> Linkedin]  [image: Instagram]
>  [image: Skype]
> 
>
>


-- 
Dulitha Wijewantha (Chan)
Software Engineer - Mobile Development
WSO2 Inc
Lean.Enterprise.Middleware
 * ~Email   duli...@wso2.com *
*  ~Mobile +94712112165*
*  ~Website   dulitha.me *
*  ~Twitter @dulitharw *
  *~Github @dulichan *
  *~SO @chan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Any available module for jaggery to get oAuth tokens?

2015-04-24 Thread Madusanka Premaratne
Hi Dulitha,
You can call to https://localhost:8243/token to get both refresh_token and
access_token
Have a look at the following curl command
curl -k -d "grant_type=password&username=admin&password=admin" -H
"Authorization: Basic
bmU5X015dDNKWGxuTDRNWjhrbnlFdDM3cGRvYTpTSEtCOTZoX0RjeGVlMnQ0eG9JZlhMUERRRHdh,
Content-Type: application/x-www-form-urlencoded"
https://localhost:8243/token

Thanks,
Madusanka

On Fri, Apr 24, 2015 at 5:14 PM, Dulitha Wijewantha 
wrote:

> Hi guys,
> Is there are any available module for jaggery (or Java) that can be called
> to obtain oAuth 2 tokens from API Manager? I looked into the oauth module
> [1] in jaggery but it doesn't seem to return refresh tokens.
>
> My use-case is to obtain access/refresh tokens for Password/SAML Grant
> Type from a Jaggery app.
>
> [1] -
> https://github.com/wso2/jaggery-extensions/blob/master/oauth/resources/org.jaggeryjs.modules.oauth/src/main/java/org/jaggeryjs/modules/oauth/OAuthHostObject.java
>
> Cheers~
>
> --
> Dulitha Wijewantha (Chan)
> Software Engineer - Mobile Development
> WSO2 Inc
> Lean.Enterprise.Middleware
>  * ~Email   duli...@wso2.com *
> *  ~Mobile +94712112165 <%2B94712112165>*
> *  ~Website   dulitha.me *
> *  ~Twitter @dulitharw *
>   *~Github @dulichan *
>   *~SO @chan *
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Madusanka Premaratne* | Associate Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 835 70 73| Work: +94 112 145 345
Email: madusan...@wso2.com | Web: www.wso2.com

[image: Facebook]  [image: Twitter]
 [image: Google Plus]
 [image:
Linkedin]  [image: Instagram]
 [image: Skype]

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Any available module for jaggery to get oAuth tokens?

2015-04-24 Thread Dulitha Wijewantha
Hi guys,
Is there are any available module for jaggery (or Java) that can be called
to obtain oAuth 2 tokens from API Manager? I looked into the oauth module
[1] in jaggery but it doesn't seem to return refresh tokens.

My use-case is to obtain access/refresh tokens for Password/SAML Grant Type
from a Jaggery app.

[1] -
https://github.com/wso2/jaggery-extensions/blob/master/oauth/resources/org.jaggeryjs.modules.oauth/src/main/java/org/jaggeryjs/modules/oauth/OAuthHostObject.java

Cheers~

-- 
Dulitha Wijewantha (Chan)
Software Engineer - Mobile Development
WSO2 Inc
Lean.Enterprise.Middleware
 * ~Email   duli...@wso2.com *
*  ~Mobile +94712112165*
*  ~Website   dulitha.me *
*  ~Twitter @dulitharw *
  *~Github @dulichan *
  *~SO @chan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev