tokenmanager

package
v0.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package tokenmanager provides tokens for authenticating to S2A.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenManager

type AccessTokenManager interface {
	// DefaultToken returns a token that an application with no specified local
	// identity must use to authenticate to S2A.
	DefaultToken() (token string, err error)
	// Token returns a token that an application with local identity equal to
	// identity must use to authenticate to S2A.
	Token(identity interface{}) (token string, err error)
}

AccessTokenManager manages tokens for authenticating to S2A.

func NewSingleTokenAccessTokenManager

func NewSingleTokenAccessTokenManager() (AccessTokenManager, error)

NewSingleTokenAccessTokenManager returns a new AccessTokenManager instance that will always manage the same token.

The token to be managed is read from the s2aAccessTokenEnvironmentVariable environment variable. If this environment variable is not set, then this function returns an error.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL