getting API key from user/pass

classic Classic list List threaded Threaded
7 messages Options
| Threaded
Open this post in threaded view
|

getting API key from user/pass

Eric Rasche
John,
 
I'm looking to use blend4j, and I was wondering if there was a way to obtain the user's API key from a username/password pair?
 
Cheers,
Eric
 
--
Eric Rasche
Programmer II
Center for Phage Technology
Texas A&M Univesity
College Station, TX 77843
Ph: <a href="http://tel:4046922048">4046922048
 
 

___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|

Re: getting API key from user/pass

Martin Čech
file  api/authenticate.py

class AuthenticationController( BaseAPIController, CreatesApiKeysMixin ):

    @web.expose_api_anonymous
    def get_api_key( self, trans, **kwd ):
        """
        def get_api_key( self, trans, **kwd )
        * GET /api/authenticate/baseauth
          returns an API key for authenticated user based on BaseAuth headers

        :returns: api_key in json format
        :rtype:   dict

        :raises: ObjectNotFound, HTTPBadRequest
        """


On Mon, Jul 21, 2014 at 10:06 AM, Eric Rasche <[hidden email]> wrote:
John,
 
I'm looking to use blend4j, and I was wondering if there was a way to obtain the user's API key from a username/password pair?
 
Cheers,
Eric
 
--
Eric Rasche
Programmer II
Center for Phage Technology
Texas A&M Univesity
College Station, TX 77843
Ph: <a href="http://tel:4046922048" target="_blank">4046922048
 
 

___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/


___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|

Re: getting API key from user/pass

Eric Rasche

Martin,

Ah, good to have the API call needed. Could this possibly be added to the wiki, perhaps on Learn/API?

That particular URL doesn't seem to be in blend4j so this answers that question as well, thanks!

Cheers,
Eric

21.07.2014, 15:13, "Martin Čech" <[hidden email]>:

 file  api/authenticate.py

 class AuthenticationController( BaseAPIController, CreatesApiKeysMixin ):

     @web.expose_api_anonymous
     def get_api_key( self, trans, **kwd ):

         """
         def get_api_key( self, trans, **kwd )
         * GET /api/authenticate/baseauth
           returns an API key for authenticated user based on BaseAuth headers

         :returns: api_key in json format
         :rtype:   dict

         :raises: ObjectNotFound, HTTPBadRequest
         """

 On Mon, Jul 21, 2014 at 10:06 AM, Eric Rasche <[hidden email]> wrote:
 John,

 I'm looking to use blend4j, and I was wondering if there was a way to obtain the user's API key from a username/password pair?

 Cheers,
 Eric

 --
 Eric Rasche
 Programmer II
 Center for Phage Technology
 Texas A&M Univesity

 College Station, TX 77843
 Ph: 4046922048

 ___________________________________________________________
 Please keep all replies on the list by using "reply all"
 in your mail client.  To manage your subscriptions to this
 and other Galaxy lists, please use the interface at:
   http://lists.bx.psu.edu/

 To search Galaxy mailing lists use the unified search at:
   http://galaxyproject.org/search/mailinglists/

--
Eric Rasche
Programmer II
Center for Phage Technology
Texas A&M Univesity
College Station, TX 77843
Ph: 4046922048


___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|

Re: getting API key from user/pass

Martin Čech
Done.


On Mon, Jul 21, 2014 at 10:30 AM, Eric Rasche <[hidden email]> wrote:

Martin,

Ah, good to have the API call needed. Could this possibly be added to the wiki, perhaps on Learn/API?

That particular URL doesn't seem to be in blend4j so this answers that question as well, thanks!

Cheers,
Eric

21.07.2014, 15:13, "Martin Čech" <[hidden email]>:

 file  api/authenticate.py

 class AuthenticationController( BaseAPIController, CreatesApiKeysMixin ):

     @web.expose_api_anonymous
     def get_api_key( self, trans, **kwd ):

         """
         def get_api_key( self, trans, **kwd )
         * GET /api/authenticate/baseauth
           returns an API key for authenticated user based on BaseAuth headers

         :returns: api_key in json format
         :rtype:   dict

         :raises: ObjectNotFound, HTTPBadRequest
         """

 On Mon, Jul 21, 2014 at 10:06 AM, Eric Rasche <[hidden email]> wrote:
 John,

 I'm looking to use blend4j, and I was wondering if there was a way to obtain the user's API key from a username/password pair?

 Cheers,
 Eric

 --
 Eric Rasche
 Programmer II
 Center for Phage Technology
 Texas A&M Univesity

 College Station, TX 77843
 Ph: 4046922048

 ___________________________________________________________
 Please keep all replies on the list by using "reply all"
 in your mail client.  To manage your subscriptions to this
 and other Galaxy lists, please use the interface at:
   http://lists.bx.psu.edu/

 To search Galaxy mailing lists use the unified search at:
   http://galaxyproject.org/search/mailinglists/

--
Eric Rasche
Programmer II
Center for Phage Technology
Texas A&M Univesity
College Station, TX 77843
Ph: 4046922048



___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|

Re: getting API key from user/pass

John Chilton-4
Hey Eric,

This is not possible (easily anyway) in the latest release of blend4j.
It was on the TODO list though so I have added the functionality in
the following commit:

https://github.com/jmchilton/blend4j/commit/f92909fbda3616da09614b65810ebd86ce496b19

So instead of using GalaxyInstanceFactory.get(url, key) to create
'GalaxyInstance' objects, you will need to use
GalaxyInstanceFactory.getFromCredentials(url, email, password).

Mirrors work I had previously done in bioblend
(https://github.com/afgane/bioblend/commit/07a07b99495a867a9d17bc5c1e22a3739da052ba)
based on the API endpoint Martin had mentioned.

Any chance you have a setup allowing you to use this without me
needing to do a new release of blend4j or do you need the artifacts to
be in maven central?

-John

On Mon, Jul 21, 2014 at 9:47 AM, Martin Čech <[hidden email]> wrote:

> Done.
>
>
> On Mon, Jul 21, 2014 at 10:30 AM, Eric Rasche <[hidden email]> wrote:
>>
>> Martin,
>>
>> Ah, good to have the API call needed. Could this possibly be added to the
>> wiki, perhaps on Learn/API?
>>
>> That particular URL doesn't seem to be in blend4j so this answers that
>> question as well, thanks!
>>
>> Cheers,
>> Eric
>>
>> 21.07.2014, 15:13, "Martin Čech" <[hidden email]>:
>>
>>  file  api/authenticate.py
>>
>>  class AuthenticationController( BaseAPIController, CreatesApiKeysMixin ):
>>
>>      @web.expose_api_anonymous
>>      def get_api_key( self, trans, **kwd ):
>>
>>          """
>>          def get_api_key( self, trans, **kwd )
>>          * GET /api/authenticate/baseauth
>>            returns an API key for authenticated user based on BaseAuth
>> headers
>>
>>          :returns: api_key in json format
>>          :rtype:   dict
>>
>>          :raises: ObjectNotFound, HTTPBadRequest
>>          """
>>
>>  On Mon, Jul 21, 2014 at 10:06 AM, Eric Rasche <[hidden email]>
>> wrote:
>>
>>  John,
>>
>>  I'm looking to use blend4j, and I was wondering if there was a way to
>> obtain the user's API key from a username/password pair?
>>
>>  Cheers,
>>  Eric
>>
>>  --
>>  Eric Rasche
>>  Programmer II
>>  Center for Phage Technology
>>  Texas A&M Univesity
>>
>>  College Station, TX 77843
>>  Ph: 4046922048
>>
>>  ___________________________________________________________
>>  Please keep all replies on the list by using "reply all"
>>  in your mail client.  To manage your subscriptions to this
>>  and other Galaxy lists, please use the interface at:
>>    http://lists.bx.psu.edu/
>>
>>  To search Galaxy mailing lists use the unified search at:
>>    http://galaxyproject.org/search/mailinglists/
>>
>> --
>> Eric Rasche
>> Programmer II
>> Center for Phage Technology
>> Texas A&M Univesity
>> College Station, TX 77843
>> Ph: 4046922048
>>
>

___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|

Re: getting API key from user/pass

Eric Rasche
Hi John,

Okay, not a problem, no need to push new artifacts on my behalf.
Jetty (basically all of your dependencies) aren't currently ported to android which puts that particular project on hold for me, for the time being.

Thanks for being aware of this issue.

Cheers,
Eric

22.07.2014, 21:10, "John Chilton" <[hidden email]>:

>  Hey Eric,
>
>  This is not possible (easily anyway) in the latest release of blend4j.
>  It was on the TODO list though so I have added the functionality in
>  the following commit:
>
>  https://github.com/jmchilton/blend4j/commit/f92909fbda3616da09614b65810ebd86ce496b19
>
>  So instead of using GalaxyInstanceFactory.get(url, key) to create
>  'GalaxyInstance' objects, you will need to use
>  GalaxyInstanceFactory.getFromCredentials(url, email, password).
>
>  Mirrors work I had previously done in bioblend
>  (https://github.com/afgane/bioblend/commit/07a07b99495a867a9d17bc5c1e22a3739da052ba)
>  based on the API endpoint Martin had mentioned.
>
>  Any chance you have a setup allowing you to use this without me
>  needing to do a new release of blend4j or do you need the artifacts to
>  be in maven central?
>
>  -John
>
>  On Mon, Jul 21, 2014 at 9:47 AM, Martin Čech <[hidden email]> wrote:
>>   Done.
>>
>>   On Mon, Jul 21, 2014 at 10:30 AM, Eric Rasche <[hidden email]> wrote:
>>>   Martin,
>>>
>>>   Ah, good to have the API call needed. Could this possibly be added to the
>>>   wiki, perhaps on Learn/API?
>>>
>>>   That particular URL doesn't seem to be in blend4j so this answers that
>>>   question as well, thanks!
>>>
>>>   Cheers,
>>>   Eric
>>>
>>>   21.07.2014, 15:13, "Martin Čech" <[hidden email]>:
>>>
>>>    file  api/authenticate.py
>>>
>>>    class AuthenticationController( BaseAPIController, CreatesApiKeysMixin ):
>>>
>>>        @web.expose_api_anonymous
>>>        def get_api_key( self, trans, **kwd ):
>>>
>>>            """
>>>            def get_api_key( self, trans, **kwd )
>>>            * GET /api/authenticate/baseauth
>>>              returns an API key for authenticated user based on BaseAuth
>>>   headers
>>>
>>>            :returns: api_key in json format
>>>            :rtype:   dict
>>>
>>>            :raises: ObjectNotFound, HTTPBadRequest
>>>            """
>>>
>>>    On Mon, Jul 21, 2014 at 10:06 AM, Eric Rasche <[hidden email]>
>>>   wrote:
>>>
>>>    John,
>>>
>>>    I'm looking to use blend4j, and I was wondering if there was a way to
>>>   obtain the user's API key from a username/password pair?
>>>
>>>    Cheers,
>>>    Eric
>>>
>>>    --
>>>    Eric Rasche
>>>    Programmer II
>>>    Center for Phage Technology
>>>    Texas A&M Univesity
>>>
>>>    College Station, TX 77843
>>>    Ph: 4046922048
>>>
>>>    ___________________________________________________________
>>>    Please keep all replies on the list by using "reply all"
>>>    in your mail client.  To manage your subscriptions to this
>>>    and other Galaxy lists, please use the interface at:
>>>      http://lists.bx.psu.edu/
>>>
>>>    To search Galaxy mailing lists use the unified search at:
>>>      http://galaxyproject.org/search/mailinglists/
>>>
>>>   --
>>>   Eric Rasche
>>>   Programmer II
>>>   Center for Phage Technology
>>>   Texas A&M Univesity
>>>   College Station, TX 77843
>>>   Ph: 4046922048

--
Eric Rasche
Programmer II
Center for Phage Technology
Texas A&M Univesity
College Station, TX 77843
Ph: 4046922048
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|

Re: getting API key from user/pass

John Chilton-4
On Tue, Jul 22, 2014 at 3:13 PM, Eric Rasche <[hidden email]> wrote:
> Hi John,
>
> Okay, not a problem, no need to push new artifacts on my behalf.
> Jetty (basically all of your dependencies) aren't currently ported to android which puts that particular project on hold for me, for the time being.

Hmm... that is too bad. They should do that - seems like Android would
be a key platform for a web service client library. Oh well.

-John

>
> Thanks for being aware of this issue.
>
> Cheers,
> Eric
>
> 22.07.2014, 21:10, "John Chilton" <[hidden email]>:
>>  Hey Eric,
>>
>>  This is not possible (easily anyway) in the latest release of blend4j.
>>  It was on the TODO list though so I have added the functionality in
>>  the following commit:
>>
>>  https://github.com/jmchilton/blend4j/commit/f92909fbda3616da09614b65810ebd86ce496b19
>>
>>  So instead of using GalaxyInstanceFactory.get(url, key) to create
>>  'GalaxyInstance' objects, you will need to use
>>  GalaxyInstanceFactory.getFromCredentials(url, email, password).
>>
>>  Mirrors work I had previously done in bioblend
>>  (https://github.com/afgane/bioblend/commit/07a07b99495a867a9d17bc5c1e22a3739da052ba)
>>  based on the API endpoint Martin had mentioned.
>>
>>  Any chance you have a setup allowing you to use this without me
>>  needing to do a new release of blend4j or do you need the artifacts to
>>  be in maven central?
>>
>>  -John
>>
>>  On Mon, Jul 21, 2014 at 9:47 AM, Martin Čech <[hidden email]> wrote:
>>>   Done.
>>>
>>>   On Mon, Jul 21, 2014 at 10:30 AM, Eric Rasche <[hidden email]> wrote:
>>>>   Martin,
>>>>
>>>>   Ah, good to have the API call needed. Could this possibly be added to the
>>>>   wiki, perhaps on Learn/API?
>>>>
>>>>   That particular URL doesn't seem to be in blend4j so this answers that
>>>>   question as well, thanks!
>>>>
>>>>   Cheers,
>>>>   Eric
>>>>
>>>>   21.07.2014, 15:13, "Martin Čech" <[hidden email]>:
>>>>
>>>>    file  api/authenticate.py
>>>>
>>>>    class AuthenticationController( BaseAPIController, CreatesApiKeysMixin ):
>>>>
>>>>        @web.expose_api_anonymous
>>>>        def get_api_key( self, trans, **kwd ):
>>>>
>>>>            """
>>>>            def get_api_key( self, trans, **kwd )
>>>>            * GET /api/authenticate/baseauth
>>>>              returns an API key for authenticated user based on BaseAuth
>>>>   headers
>>>>
>>>>            :returns: api_key in json format
>>>>            :rtype:   dict
>>>>
>>>>            :raises: ObjectNotFound, HTTPBadRequest
>>>>            """
>>>>
>>>>    On Mon, Jul 21, 2014 at 10:06 AM, Eric Rasche <[hidden email]>
>>>>   wrote:
>>>>
>>>>    John,
>>>>
>>>>    I'm looking to use blend4j, and I was wondering if there was a way to
>>>>   obtain the user's API key from a username/password pair?
>>>>
>>>>    Cheers,
>>>>    Eric
>>>>
>>>>    --
>>>>    Eric Rasche
>>>>    Programmer II
>>>>    Center for Phage Technology
>>>>    Texas A&M Univesity
>>>>
>>>>    College Station, TX 77843
>>>>    Ph: 4046922048
>>>>
>>>>    ___________________________________________________________
>>>>    Please keep all replies on the list by using "reply all"
>>>>    in your mail client.  To manage your subscriptions to this
>>>>    and other Galaxy lists, please use the interface at:
>>>>      http://lists.bx.psu.edu/
>>>>
>>>>    To search Galaxy mailing lists use the unified search at:
>>>>      http://galaxyproject.org/search/mailinglists/
>>>>
>>>>   --
>>>>   Eric Rasche
>>>>   Programmer II
>>>>   Center for Phage Technology
>>>>   Texas A&M Univesity
>>>>   College Station, TX 77843
>>>>   Ph: 4046922048
>
> --
> Eric Rasche
> Programmer II
> Center for Phage Technology
> Texas A&M Univesity
> College Station, TX 77843
> Ph: 4046922048

___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/