Documentation ¶
Index ¶
- Constants
- Variables
- func WithAppRoot(appRoot string) func(*phantomTokens)
- func WithCookieName(name string) func(*phantomTokens)
- func WithInsecureSkipVerify() func(*phantomTokens)
- func WithLogger(logger *slog.Logger) func(*phantomTokens)
- func WithLoginLogoutEndpoints(loginEndpoint, logoutEndpoint string) func(*phantomTokens)
- func WithProvider(configURL, clientID, clientSecret string) func(*phantomTokens)
- func WithSecretKey(key []byte) func(*phantomTokens)
- type PhantomTokenExchange
Constants ¶
View Source
const ( NONE tokenState = 0 REFRESHING tokenState = 1 ACTIVE tokenState = 2 )
Variables ¶
View Source
var ErrNoSuchSession error = errors.New("no such session")
View Source
var ErrNoToken error = errors.New("session has no token")
View Source
var ErrRefreshTokenExpired error = errors.New("refresh token expired")
Functions ¶
func WithAppRoot ¶
func WithAppRoot(appRoot string) func(*phantomTokens)
func WithCookieName ¶
func WithCookieName(name string) func(*phantomTokens)
func WithInsecureSkipVerify ¶
func WithInsecureSkipVerify() func(*phantomTokens)
func WithLogger ¶
func WithLoginLogoutEndpoints ¶
func WithLoginLogoutEndpoints(loginEndpoint, logoutEndpoint string) func(*phantomTokens)
func WithProvider ¶
func WithProvider(configURL, clientID, clientSecret string) func(*phantomTokens)
func WithSecretKey ¶
func WithSecretKey(key []byte) func(*phantomTokens)
Types ¶
type PhantomTokenExchange ¶
type PhantomTokenExchange interface { Middleware() func(http.Handler) http.Handler InstallChiHandlers(r *chi.Mux) Shutdown() }
func NewPhantomTokenExchange ¶
func NewPhantomTokenExchange(opts ...func(*phantomTokens)) (PhantomTokenExchange, error)
Click to show internal directories.
Click to hide internal directories.