Documentation ¶
Index ¶
Constants ¶
View Source
const (
SessionMaxAge = time.Hour * 24
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Browser ¶ added in v0.25.0
type Browser interface {
GetTokenFromBrowser(context.Context, *oauth2.Config) (*oauth2.Token, error)
}
Browser implements the browser handler for the OAuth2 login flow.
type Cache ¶ added in v0.24.0
type Cache struct { // AccessToken is the bearer token used to authenticate to HCP. AccessToken string `json:"access_token,omitempty"` // RefreshToken is used to get a new access token. RefreshToken string `json:"refresh_token,omitempty"` // AccessTokenExpiry is when the access token will expire. AccessTokenExpiry time.Time `json:"access_token_expiry,omitempty"` // SessionExpiry is the session limit. SessionExpiry time.Time `json:"session_expiry,omitempty"` }
type MockSession ¶ added in v0.25.0
type MockSession struct{}
type Session ¶ added in v0.25.0
type Session interface {
GetToken(ctx context.Context, conf *oauth2.Config) (*oauth2.Token, error)
}
Session handles managing a user's session.
type UserSession ¶ added in v0.25.0
type UserSession struct {
// contains filtered or unexported fields
}
UserSession implements the auth package's Session interface
Click to show internal directories.
Click to hide internal directories.