forked from TrueCloudLab/distribution
Add post token implementation
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
parent
c21f4eb561
commit
d6a1778282
1 changed files with 2 additions and 2 deletions
|
@ -54,7 +54,7 @@ var (
|
||||||
// ErrInvalidCredential is returned when the auth token does not authenticate correctly.
|
// ErrInvalidCredential is returned when the auth token does not authenticate correctly.
|
||||||
ErrInvalidCredential = errors.New("invalid authorization credential")
|
ErrInvalidCredential = errors.New("invalid authorization credential")
|
||||||
|
|
||||||
// ErrAuthenticationFailure returned when authentication failure to be presented to agent.
|
// ErrAuthenticationFailure returned when authentication fails.
|
||||||
ErrAuthenticationFailure = errors.New("authentication failure")
|
ErrAuthenticationFailure = errors.New("authentication failure")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ type AccessController interface {
|
||||||
Authorized(ctx context.Context, access ...Access) (context.Context, error)
|
Authorized(ctx context.Context, access ...Access) (context.Context, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// CredentialAuthenticator is an object which is able to validate credentials
|
// CredentialAuthenticator is an object which is able to authenticate credentials
|
||||||
type CredentialAuthenticator interface {
|
type CredentialAuthenticator interface {
|
||||||
AuthenticateUser(username, password string) error
|
AuthenticateUser(username, password string) error
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue