authenticator

package module
v0.0.0-...-22c6e00 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

README

Neuron Authenticator

This repository contains Neuron auth.Authenticator implementation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator struct {
	Options *auth.AuthenticatorOptions
}

Authenticator is the structure that implements auth.Authenticator as well as auth.Tokener interfaces. It is used to provide full authentication process for the

func New

func New(options ...auth.AuthenticatorOption) *Authenticator

New creates new authenticator for provided options. By default it uses in-memory store for the revoked tokens.

func (*Authenticator) ComparePassword

func (a *Authenticator) ComparePassword(acc auth.Account, password string) error

ComparePassword compares the password (with optional salt) hash with the provided 'password'.

func (*Authenticator) HashAndSetPassword

func (a *Authenticator) HashAndSetPassword(acc auth.Account, password *auth.Password) error

HashAndSetPassword implements auth.PasswordHasher interface.

Jump to

Keyboard shortcuts

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