Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

How to get the UUID of the urn:globus:auth:scope:transfer.api.globus.org:all scope?

47 views
Skip to first unread message

Karl Kornel

unread,
May 4, 2020, 1:00:08 PM5/4/20
to Developer Discuss
Hello!

I am starting to explore creating my own Globus Auth scopes, and I would like to create a scope that depends on the urn:globus:auth:scope:transfer.api.globus.org:all scope.  In other words, if someone gets a token for my scope, then the resource server I make will be able to use that token to get a transfer token, to be able to initiate transfers on behalf of the user.

Looking at the documentation for Create Scope, it looks like I'll need to get the UUID of the urn:globus:auth:scope:transfer.api.globus.org:all scope.  Should I get that UUID by doing a call to…

/v2/api/scopes?scope_strings=urn:globus:auth:scope:transfer.api.globus.org:all

…?

Sam Claassens

unread,
May 4, 2020, 3:32:28 PM5/4/20
to develope...@globus.org, akko...@stanford.edu
Hi Karl,

Yes, you can look up any scopes using scopes?scope_strings, as long as the scopes are advertised or the owning client is public. 

To create the dependency, you would then provide this in the dependent scopes field when you create your scope. For example, the create scope payload would be something like  (using the ID for urn:globus:auth:scope:transfer.api.globus.org:all = 80fa5a88-ae26-4db7-be3a-c5f4cf4ac8d2):
{
    'scope': {
        'name' : 'ExampleScope',
        'description' : 'Example dependency',
        'scope_suffix' : 'example_scope',
        'dependent_scopes': [
            {
                'scope': '80fa5a88-ae26-4db7-be3a-c5f4cf4ac8d2',
                'optional': False,
                'requires_refresh_token': False
            }
        ]
    }
}

Please let us know if we can help with any more information. Thanks for highlighting this by the way, we'll add more documentation around this call.

Regards,
Sam
 
Reply all
Reply to author
Forward
0 new messages