store

package
v0.0.0-...-066019b Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyMap

type KeyMap map[string]model.RSAKeyPair

type MongoStore

type MongoStore struct {
	User  MongoUserStore
	Token MongoTokenStore
	// contains filtered or unexported fields
}

func NewMongoStore

func NewMongoStore(mongoClient *mongo.Client) MongoStore

type MongoTokenStore

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

func (*MongoTokenStore) DeleteByToken

func (s *MongoTokenStore) DeleteByToken(token string) error

func (*MongoTokenStore) FindByToken

func (s *MongoTokenStore) FindByToken(token string) (claims model.RefreshTokenClaims, err error)

func (*MongoTokenStore) SaveToken

func (s *MongoTokenStore) SaveToken(claims model.RefreshTokenClaims) error

type MongoUserStore

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

func (*MongoUserStore) Create

func (s *MongoUserStore) Create(params model.RegisterRequestParams) (user model.User, err error)

func (*MongoUserStore) FindByCredentials

func (s *MongoUserStore) FindByCredentials(credentials model.Credentials) (user model.User, err error)

func (*MongoUserStore) FindById

func (s *MongoUserStore) FindById(id string) (user model.User, err error)

type RSAKeyStore

type RSAKeyStore struct {
	DefaultKeyId string
	// contains filtered or unexported fields
}

func NewRSAKeyStore

func NewRSAKeyStore(path string, defaultKeyId string) (store RSAKeyStore)

func (*RSAKeyStore) GetAllKeyPairs

func (c *RSAKeyStore) GetAllKeyPairs() (keyMap KeyMap)

func (*RSAKeyStore) GetDefaultKeyPair

func (c *RSAKeyStore) GetDefaultKeyPair() (keyPair model.RSAKeyPair)

func (*RSAKeyStore) GetKeyPairById

func (c *RSAKeyStore) GetKeyPairById(id string) (keyPair model.RSAKeyPair, ok bool)

Jump to

Keyboard shortcuts

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