mongo

package
v0.0.0-...-8d5b3bf Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

func NewStore

func NewStore(
	ctx context.Context,
	mongoClient *mongodb.Client,
	clientManager fosite.ClientManager,
) (*Store, error)

func (*Store) ClientAssertionJWTValid

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

ClientAssertionJWTValid returns an error if the JTI is known or the DB check failed and nil if the JTI is not known.

func (*Store) CreateAccessTokenSession

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

func (*Store) CreateAuthorizeCodeSession

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

func (*Store) CreatePARSession

func (s *Store) CreatePARSession(ctx context.Context, requestURI string, request fosite.AuthorizeRequester) error

func (*Store) CreatePKCERequestSession

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

func (*Store) CreateRefreshTokenSession

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

func (*Store) DeleteAccessTokenSession

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

func (*Store) DeletePARSession

func (s *Store) DeletePARSession(ctx context.Context, requestURI string) error

func (*Store) DeletePKCERequestSession

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

func (*Store) DeleteRefreshTokenSession

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

func (*Store) GetAccessTokenSession

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

func (*Store) GetAuthorizeCodeSession

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

func (*Store) GetClient

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

GetClient loads the client by its ID or returns an error if the client does not exist or another error occurred.

func (*Store) GetPARSession

func (s *Store) GetPARSession(ctx context.Context, requestURI string) (fosite.AuthorizeRequester, error)

func (*Store) GetPKCERequestSession

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

func (*Store) GetRefreshTokenSession

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

func (*Store) InvalidateAuthorizeCodeSession

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

func (*Store) RevokeAccessToken

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

func (*Store) RevokeRefreshToken

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

func (*Store) RevokeRefreshTokenMaybeGracePeriod

func (s *Store) RevokeRefreshTokenMaybeGracePeriod(ctx context.Context, requestID string, signature string) error

func (*Store) SetClientAssertionJWT

func (s *Store) SetClientAssertionJWT(ctx context.Context, jti string, exp time.Time) error

SetClientAssertionJWT marks a JTI as known for the given expiry time. Before inserting the new JTI, it will clean up any existing JTIs that have expired as those tokens can not be replayed due to the expiry.

Jump to

Keyboard shortcuts

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