This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
The following shows how the scope created in the earlier example can be used between a | |
client and a server. First the client needs to login with the custom scope defined earlier. | |
Globus Auth then issues the client an access token which can only be used with the service | |
that owns the scope. | |
When a client sends a request to the service, the server does two things: | |
1. introspects the token to ensure the request is valid (in scope, user has permission, etc) | |
2. Uses the Dependent Token Grant to get user access tokens. | |
The access tokens procured in step 2 can be used for actions on behalf of the user. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a script to create a new Globus Scope for an existing Globus | |
# App. This script only needs to be run once, after that the scope will | |
# exist for the lifetime of the app or until it is deleted. | |
# | |
# You can create a new Globus App at https://developers.globus.org/ | |
# Detailed documentation about the API class below can be found here: | |
# https://docs.globus.org/api/auth/reference/#clients_and_scopes_api | |
# You need to set the following before running this script! | |
# export CLIENT_ID=<client_id> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Requires Gladier and Gladier Tools. | |
pip install gladier gladier-tools | |
""" | |
from gladier import GladierBaseClient, generate_flow_definition | |
from pprint import pprint | |
@generate_flow_definition | |
class TarAndTransfer(GladierBaseClient): |