[Iplant-api-dev] Testing API Keys and Secrets

Dennis Roberts dennis at iplantcollaborative.org
Mon Sep 22 13:43:23 MST 2014


That sounds good. Thanks.

Dennis

On Sep 22, 2014, at 1:36 PM, Rion Dooley <dooley at tacc.utexas.edu> wrote:

> The username and password doesn’t have to be good, just present. You get a different error message for a bad password than a bad client.
> 
> $ curl -sku “abcd123:efgh456" -X POST -d "grant_type=password&username=dennis&password=blahblah&scope=PRODUCTION" -H "Content-Type:application/x-www-form-urlencoded" https://agave.iplantc.org/token
> {
>     "error": "invalid_client”, 
>     "error_description": "Client Authentication was failed.” 
> }
> $ curl -sku “$API_KEY:$API_SECRET" -X POST -d "grant_type=password&username=dennis&password=blahblah&scope=PRODUCTION" -H "Content-Type:application/x-www-form-urlencoded" https://agave.iplantc.org/token
> {
>     "error": "invalid_grant",
>     "error_description": "Provided Authorization Grant is invalid."
> }
> 
> --
> Rion
> 
> 
> 
> 
> On Sep 22, 2014, at 3:25 PM, Dennis Roberts <dennis at iplantcollaborative.org> wrote:
> 
>> I was hoping to avoid having to have a known username and password configured in the DE if possible. Are there any other options? If not, I’ll use that option.
>> 
>> Thanks,
>> Dennis
>> 
>> On Sep 22, 2014, at 1:24 PM, Rion Dooley <dooley at tacc.utexas.edu> wrote:
>> 
>>> You could try to authenticate with a known username and password using the API keys. That will throw an error if the keys are bad.
>>> 
>>> --
>>> Rion
>>> 
>>> 
>>> 
>>> 
>>> On Sep 22, 2014, at 3:21 PM, Dennis Roberts <dennis at iplantcollaborative.org> wrote:
>>> 
>>>> I apologize if this question has an obvious answer, but I couldn’t find one in the documentation. Is there an Agave endpoint that I can hit in order to test only my Agave API key and secret to make sure that they’re valid? What I want to do is have some assurance that the authorization can succeed before I redirect the user.
>>>> 
>>>> Thanks,
>>>> Dennis
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Iplant-api-dev Mailing List: Iplant-api-dev at iplantcollaborative.org
>>>> List Info and Archives: http://mail.iplantcollaborative.org/mailman/listinfo/iplant-api-dev  
>>>> One-click Unsubscribe: http://mail.iplantcollaborative.org/mailman/options/iplant-api-dev/dooley%40tacc.utexas.edu?unsub=1&unsubconfirm=1 
>>> 
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iplantcollaborative.org/pipermail/iplant-api-dev/attachments/20140922/2649387b/attachment-0001.html 


More information about the Iplant-api-dev mailing list