-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
** Please make sure you read the contribution guide and file the issues in the right place. **
Contribution guide.
Is your feature request related to a problem? Please describe.
ADK works well when it controls OAUth flow. However when ADK agents gets access token from external system - there is no standardized way to get that token. Token can be passed through HTTP Bearer, Session State or Credentials Service. Having helper functions that would be used in auth_credential object to specify from where ADK should take the token would help
Describe the solution you'd like
A clear and concise description of what you want to happen.
auth_credential = AuthCredential(
auth_type=AuthCredentialTypes.OAUTH2,
oauth2=OAuth2Auth(
access_token=---->>>>>> HELPER <<<<<<<<<<<<< # Set the existing access token
)
)
auth_credential = AuthCredential(
auth_type=AuthCredentialTypes.OAUTH2,
oauth2=OAuth2Auth(
access_token=existing_access_token # Set the existing access token
)
)
Like:
auth_credential = AuthCredential(
auth_type=AuthCredentialTypes.OAUTH2,
oauth2=OAuth2Auth(
access_token=AuthHelper.GetHTTPBearer() # to dynamically get token from HTTP bearer at runtime
)
)
auth_credential = AuthCredential(
auth_type=AuthCredentialTypes.OAUTH2,
oauth2=OAuth2Auth(
access_token=AuthHelper.GetFromSessionStateKey(key_name) # to dynamically get from session state
)
)
auth_credential = AuthCredential(
auth_type=AuthCredentialTypes.OAUTH2,
oauth2=OAuth2Auth(
access_token=AuthHelper.GetCredentialsService(key_name) # to dynamically get from Credentials Service
)
)
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.