oidcredis

package module
v0.0.0-...-39aa0e5 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnimplemented = errors.New("unimplemented method")

Functions

This section is empty.

Types

type AuthStorage

type AuthStorage struct {
	AuthRequests RedisClient
	Tokens       RedisClient
}

func (*AuthStorage) AuthRequestByCode

func (s *AuthStorage) AuthRequestByCode(context.Context, string) (op.AuthRequest, error)

func (*AuthStorage) AuthRequestByID

func (s *AuthStorage) AuthRequestByID(context.Context, string) (op.AuthRequest, error)

func (*AuthStorage) Close

func (s *AuthStorage) Close() error

func (*AuthStorage) CreateAccessAndRefreshTokens

func (s *AuthStorage) CreateAccessAndRefreshTokens(ctx context.Context, request op.TokenRequest, currentRefreshToken string) (accessTokenID string, newRefreshTokenID string, expiration time.Time, err error)

func (*AuthStorage) CreateAccessToken

func (s *AuthStorage) CreateAccessToken(context.Context, op.TokenRequest) (accessTokenID string, expiration time.Time, err error)

func (*AuthStorage) CreateAuthRequest

func (s *AuthStorage) CreateAuthRequest(context.Context, *oidc.AuthRequest, string) (op.AuthRequest, error)

func (*AuthStorage) DeleteAuthRequest

func (s *AuthStorage) DeleteAuthRequest(context.Context, string) error

func (*AuthStorage) GetKeySet

func (s *AuthStorage) GetKeySet(context.Context) (*jose.JSONWebKeySet, error)

func (*AuthStorage) GetSigningKey

func (s *AuthStorage) GetSigningKey(context.Context, chan<- jose.SigningKey)

func (*AuthStorage) Health

func (s *AuthStorage) Health(ctx context.Context) error

func (*AuthStorage) RevokeToken

func (s *AuthStorage) RevokeToken(ctx context.Context, tokenID string, userID string, clientID string) *oidc.Error

func (*AuthStorage) SaveAuthCode

func (s *AuthStorage) SaveAuthCode(context.Context, string, string) error

func (*AuthStorage) TerminateSession

func (s *AuthStorage) TerminateSession(ctx context.Context, userID string, clientID string) error

func (*AuthStorage) TokenRequestByRefreshToken

func (s *AuthStorage) TokenRequestByRefreshToken(ctx context.Context, refreshTokenID string) (op.RefreshTokenRequest, error)

type RedisClient

type RedisClient interface {
	Close() error
	Ping(context.Context) *redis.StatusCmd
}

RedisClient describes the methods consumed by this package. This allows for switching between singular/cluser/sentinel clients.

type Request

type Request struct {
	model.Request
}

Request implements both AuthRequest and RefreshTokenRequest, as they have overlapping properties. Unused fieldnames are automatically hidden by the interface types uses in AuthStorage.

func (*Request) Done

func (req *Request) Done() bool

func (*Request) GetAuthTime

func (req *Request) GetAuthTime() time.Time

func (*Request) GetCodeChallenge

func (req *Request) GetCodeChallenge() *oidc.CodeChallenge

func (*Request) GetResponseMode

func (req *Request) GetResponseMode() oidc.ResponseMode

func (*Request) GetResponseType

func (req *Request) GetResponseType() oidc.ResponseType

func (*Request) SetCurrentScopes

func (req *Request) SetCurrentScopes(scopes []string)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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