auth

package
v0.0.0-...-b10949b Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CookieAccessTokenKey  = "access-token"
	CookieRefreshTokenKey = "refresh-token"
)

Variables

View Source
var (
	ErrUserDisabled            = errors.New("user disabled")
	ErrInvalidPKCECode         = errors.New("invalid pkce code")
	ErrInvalidPasswordlessFlow = errors.New("invalid passwordless flow")
	ErrInvalidPKCEFlow         = errors.New("invalid pkce flow")
	ErrInvalidUsername         = errors.New("invalid username")
	ErrInvalidSession          = errors.New("invalid session")
	ErrAuthClientExists        = errors.New("auth client exists")
	ErrAuthClientNotExists     = errors.New("auth client not exists")
	ErrInvalidClientID         = errors.New("invalid client id")
)

Functions

func InitAuthService

func InitAuthService() staging.Details

func NewMux

func NewMux(sysCfg *config.Config, params authServiceMuxParams) services.Mux

Types

type AuthClientExistsError

type AuthClientExistsError struct{}

func (*AuthClientExistsError) Error

func (e *AuthClientExistsError) Error() string

func (*AuthClientExistsError) HTTPResponse

func (e *AuthClientExistsError) HTTPResponse() apires.ErrorDetails

func (*AuthClientExistsError) Is

func (e *AuthClientExistsError) Is(target error) bool

type AuthClientNotExistsError

type AuthClientNotExistsError struct{}

func (*AuthClientNotExistsError) Error

func (e *AuthClientNotExistsError) Error() string

func (*AuthClientNotExistsError) HTTPResponse

func (e *AuthClientNotExistsError) HTTPResponse() apires.ErrorDetails

func (*AuthClientNotExistsError) Is

func (e *AuthClientNotExistsError) Is(target error) bool

type InvalidClientIDError

type InvalidClientIDError struct {
	// contains filtered or unexported fields
}

func (*InvalidClientIDError) Error

func (e *InvalidClientIDError) Error() string

func (*InvalidClientIDError) HTTPResponse

func (e *InvalidClientIDError) HTTPResponse() apires.ErrorDetails

func (*InvalidClientIDError) Is

func (e *InvalidClientIDError) Is(target error) bool

func (*InvalidClientIDError) Unwrap

func (e *InvalidClientIDError) Unwrap() error

type InvalidPKCECodeError

type InvalidPKCECodeError struct{}

func (*InvalidPKCECodeError) Error

func (e *InvalidPKCECodeError) Error() string

func (*InvalidPKCECodeError) HTTPResponse

func (e *InvalidPKCECodeError) HTTPResponse() apires.ErrorDetails

func (*InvalidPKCECodeError) Is

func (e *InvalidPKCECodeError) Is(target error) bool

type InvalidPKCEFlowError

type InvalidPKCEFlowError struct{}

func (*InvalidPKCEFlowError) Error

func (e *InvalidPKCEFlowError) Error() string

func (*InvalidPKCEFlowError) HTTPResponse

func (e *InvalidPKCEFlowError) HTTPResponse() apires.ErrorDetails

func (*InvalidPKCEFlowError) Is

func (e *InvalidPKCEFlowError) Is(target error) bool

type InvalidPasswordlessFlowError

type InvalidPasswordlessFlowError struct{}

func (*InvalidPasswordlessFlowError) Error

func (*InvalidPasswordlessFlowError) HTTPResponse

func (*InvalidPasswordlessFlowError) Is

func (e *InvalidPasswordlessFlowError) Is(target error) bool

type InvalidSessionError

type InvalidSessionError struct{}

func (*InvalidSessionError) Error

func (e *InvalidSessionError) Error() string

func (*InvalidSessionError) HTTPResponse

func (e *InvalidSessionError) HTTPResponse() apires.ErrorDetails

func (*InvalidSessionError) Is

func (e *InvalidSessionError) Is(target error) bool

type InvalidUsernameError

type InvalidUsernameError struct{}

func (*InvalidUsernameError) Error

func (e *InvalidUsernameError) Error() string

func (*InvalidUsernameError) HTTPResponse

func (e *InvalidUsernameError) HTTPResponse() apires.ErrorDetails

func (*InvalidUsernameError) Is

func (e *InvalidUsernameError) Is(target error) bool

type ServicePC

type ServicePC interface {
	GetSessionInfo(ctx context.Context, sessionID uuid.UUID) (uuid.UUID, error)
	RefreshTokenFlowHTTPCookie(ctx context.Context, w http.ResponseWriter, sessionID uuid.UUID) (uuid.UUID, error)
}

func NewServicePC

func NewServicePC(sysCfg *config.Config, params authServiceParams) ServicePC

type UserDisabledError

type UserDisabledError struct{}

func (*UserDisabledError) Error

func (e *UserDisabledError) Error() string

func (*UserDisabledError) HTTPResponse

func (e *UserDisabledError) HTTPResponse() apires.ErrorDetails

func (*UserDisabledError) Is

func (e *UserDisabledError) Is(target error) bool

Jump to

Keyboard shortcuts

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