Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Access ¶
type Access struct {
// contains filtered or unexported fields
}
Access is a service that verifies access tokens
type BcryptHasher ¶
type BcryptHasher struct {
// contains filtered or unexported fields
}
BcryptHasher implements the Hasher and HashComparer interfaces and uses Provos and Mazières's bcrypt adaptive hashing algorithm
func (*BcryptHasher) Compare ¶
func (bh *BcryptHasher) Compare(hash, password string) error
Compare compares a hashed password to a clear password
type HashComparer ¶
HashComparer describes something that can compare hashed passwords with clear passwords
type HasherComparer ¶
type HasherComparer interface { Hasher HashComparer }
HasherComparer describes something that can hash passwords and compare them with clear passwords
func NewBcryptHasher ¶
func NewBcryptHasher(runs int) HasherComparer
NewBcryptHasher instanciates a BcryptHasher and sets its number of runs
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
Token is a service that generates JWT tokens
func NewToken ¶
func NewToken(log *zerolog.Logger, user UserRepository, hash HashComparer, jws string) *Token
NewToken creates and configures an Token service
Click to show internal directories.
Click to hide internal directories.