Categorygithub.com/apstndb/tokensource
modulepackage
0.0.0-20210616073644-29566afe9c47
Repository: https://github.com/apstndb/tokensource.git
Documentation: pkg.go.dev

# README

tokensource

This repository contains some oauth2.TokenSource.

AsyncRefreshingTokenSource

This TokenSource refreshes the token asynchronously to avoid blocking.

refs: https://qiita.com/kazegusuri/items/b6123f9d3e0777d0750c#reusetokensource%E3%81%AF%E3%83%96%E3%83%AD%E3%83%83%E3%82%AF%E3%81%99%E3%82%8B

SmartIDTokenSource SmartIDTokenSource

(DEPRECATED) They have moved to https://github.com/apstndb/adcplus.

They perform ADC. Additionally, they perform impersonation when CLOUDSDK_AUTH_IMPERSONATE_SERVICE_ACCOUNT is set.

# Packages

No description provided by the author

# Functions

AsyncRefreshingTokenSource create TokenSource with the refresh config conf and the TokenSource generator function genFunc.
SmartAccessTokenSource generate oauth2.TokenSource which generates access token and supports CLOUDSDK_AUTH_IMPERSONATE_SERVICE_ACCOUNT environment variable.
SmartIDTokenSource generate oauth2.TokenSource which generates ID token and supports CLOUDSDK_AUTH_IMPERSONATE_SERVICE_ACCOUNT environment variable.

# Structs

AsyncRefreshingConfig is the refresh configuration of AsyncRefreshingTokenSource.