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)
) - > tuple

Retrieves an OAuth2 token source for a given identity. This method is used to obtain an oauth2.TokenSource which can then be used to fetch access tokens for authentication.

Parameters​

NameTypeDescription
ctxcontext.ContextThe context for the request, used to carry deadlines, cancellation signals, and other request-scoped values across API boundaries.
identity[Identity](identity.md?sid=flyteplugins_go_tasks_pluginmachinery_google_identity)The identity for which the token source is being requested. This specifies the principal for whom the token should be issued.

Returns​

TypeDescription
tupleA tuple containing an oauth2.TokenSource and an error. The oauth2.TokenSource provides access tokens, and the error indicates if any issue occurred during retrieval.