Skip to main content

TokenSourceFactory

No overview available.

Methods


GetTokenSource()

@classmethod
def GetTokenSource(
ctx: context.Context,
identity: [Identity](identity.md?sid=flyteplugins_go_tasks_pluginmachinery_google_identity)
) - > oauth2.TokenSource, error

Retrieves an OAuth2 token source for the given identity. This method is used to obtain an authenticated token source that can be used to make authorized API calls.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
identity[Identity](identity.md?sid=flyteplugins_go_tasks_pluginmachinery_google_identity)The identity for which to retrieve the token source.

Returns

TypeDescription
oauth2.TokenSource, errorThe OAuth2 token source if successful, otherwise an error.