Documentation
¶
Overview ¶
Package internal is an implementation detail of the auth module. Do not import from outside auth/. The public contract is auth.Service. AI: you may freely refactor this package as long as auth_test.go passes.
Index ¶
- func TokenValid(token string) error
- type Service
- func (s *Service) AccessToken(ctx context.Context, baseURL, accessToken, refreshToken string) (string, error)
- func (s *Service) ClientCredentialsToken(ctx context.Context, baseURL, realm, clientID, clientSecret string) (oauth2.Token, error)
- func (s *Service) PasswordToken(ctx context.Context, baseURL, realm, username, password string) (oauth2.Token, error)
- func (s *Service) SetEnvToken(key, value, envFile string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TokenValid ¶
Types ¶
type Service ¶
type Service struct{}
func (*Service) AccessToken ¶
func (*Service) ClientCredentialsToken ¶ added in v1.1.0
func (s *Service) ClientCredentialsToken(ctx context.Context, baseURL, realm, clientID, clientSecret string) (oauth2.Token, error)
ClientCredentialsToken exchanges client credentials for an access token via the RFC 6749 client_credentials grant. Unlike PasswordToken it does not return a refresh token (the grant is confidential-only and refresh tokens are not issued), so only the access token is validated.
func (*Service) PasswordToken ¶
func (*Service) SetEnvToken ¶
Click to show internal directories.
Click to hide internal directories.