oauth2

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizeSessionStore

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

func NewAuthorizeSessionStore

func NewAuthorizeSessionStore() *AuthorizeSessionStore

func (*AuthorizeSessionStore) Delete

func (s *AuthorizeSessionStore) Delete(sessionID string)

func (*AuthorizeSessionStore) Get

func (s *AuthorizeSessionStore) Get(sessionID string) (*PendingAuthorize, bool)

func (*AuthorizeSessionStore) Put

func (s *AuthorizeSessionStore) Put(sessionID string, req fosite.AuthorizeRequester)

func (*AuthorizeSessionStore) StartCleanup

func (s *AuthorizeSessionStore) StartCleanup(ctx context.Context, interval time.Duration)

type MarmotSession

type MarmotSession struct {
	UserID    string
	Username  string
	ExpiresAt map[fosite.TokenType]time.Time
}

func NewMarmotSession

func NewMarmotSession(userID, username string) *MarmotSession

func (*MarmotSession) Clone

func (s *MarmotSession) Clone() fosite.Session

func (*MarmotSession) GetExpiresAt

func (s *MarmotSession) GetExpiresAt(key fosite.TokenType) time.Time

func (*MarmotSession) GetSubject

func (s *MarmotSession) GetSubject() string

func (*MarmotSession) GetUsername

func (s *MarmotSession) GetUsername() string

func (*MarmotSession) SetExpiresAt

func (s *MarmotSession) SetExpiresAt(key fosite.TokenType, exp time.Time)

type PendingAuthorize

type PendingAuthorize struct {
	Request   fosite.AuthorizeRequester
	CreatedAt time.Time
}

type Provider

type Provider struct {
	fosite.OAuth2Provider
	Store *Store
}

func NewProvider

func NewProvider(hmacSecret []byte) *Provider

type Store

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

func NewStore

func NewStore() *Store

func (*Store) ClientAssertionJWTValid

func (s *Store) ClientAssertionJWTValid(_ context.Context, _ string) error

func (*Store) CreateAccessTokenSession

func (s *Store) CreateAccessTokenSession(_ context.Context, signature string, req fosite.Requester) error

Marmot JWTs are stateless; these methods exist only to satisfy the fosite interface.

func (*Store) CreateAuthorizeCodeSession

func (s *Store) CreateAuthorizeCodeSession(_ context.Context, code string, req fosite.Requester) error

func (*Store) CreatePKCERequestSession

func (s *Store) CreatePKCERequestSession(_ context.Context, signature string, req fosite.Requester) error

func (*Store) CreateRefreshTokenSession

func (s *Store) CreateRefreshTokenSession(_ context.Context, signature string, _ string, req fosite.Requester) error

Marmot does not issue refresh tokens; these are unused.

func (*Store) DeleteAccessTokenSession

func (s *Store) DeleteAccessTokenSession(_ context.Context, signature string) error

func (*Store) DeletePKCERequestSession

func (s *Store) DeletePKCERequestSession(_ context.Context, signature string) error

func (*Store) DeleteRefreshTokenSession

func (s *Store) DeleteRefreshTokenSession(_ context.Context, signature string) error

func (*Store) GetAccessTokenSession

func (s *Store) GetAccessTokenSession(_ context.Context, signature string, _ fosite.Session) (fosite.Requester, error)

func (*Store) GetAuthorizeCodeSession

func (s *Store) GetAuthorizeCodeSession(_ context.Context, code string, _ fosite.Session) (fosite.Requester, error)

func (*Store) GetClient

func (s *Store) GetClient(_ context.Context, id string) (fosite.Client, error)

func (*Store) GetPKCERequestSession

func (s *Store) GetPKCERequestSession(_ context.Context, signature string, _ fosite.Session) (fosite.Requester, error)

func (*Store) GetRefreshTokenSession

func (s *Store) GetRefreshTokenSession(_ context.Context, signature string, _ fosite.Session) (fosite.Requester, error)

func (*Store) InvalidateAuthorizeCodeSession

func (s *Store) InvalidateAuthorizeCodeSession(_ context.Context, code string) error

func (*Store) RegisterClient

func (s *Store) RegisterClient(client fosite.Client)

func (*Store) RevokeAccessToken

func (s *Store) RevokeAccessToken(_ context.Context, _ string) error

func (*Store) RevokeRefreshToken

func (s *Store) RevokeRefreshToken(_ context.Context, _ string) error

func (*Store) RevokeRefreshTokenMaybeGracePeriod

func (s *Store) RevokeRefreshTokenMaybeGracePeriod(_ context.Context, _ string, _ string) error

func (*Store) RotateRefreshToken

func (s *Store) RotateRefreshToken(_ context.Context, _ string, _ string) error

func (*Store) SetClientAssertionJWT

func (s *Store) SetClientAssertionJWT(_ context.Context, _ string, _ time.Time) error

func (*Store) StartCleanup

func (s *Store) StartCleanup(ctx context.Context, interval time.Duration)

Jump to

Keyboard shortcuts

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