basic

package
v0.0.0-...-98b9f36 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PasswordVerifier

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

PasswordVerifier checks if the current user `matches any of the given passwords

func NewPasswordVerifier

func NewPasswordVerifier(users []*user) *PasswordVerifier

NewPasswordVerifier creates a new instance of PasswordVerifier

func (*PasswordVerifier) Verify

func (v *PasswordVerifier) Verify(r *http.Request, httpClient *http.Client) (bool, error)

Verify makes a check and return a boolean if the check was successful or not

type Provider

type Provider struct {
	provider.Verifier
}

Provider abstracts the authentication for github

func (*Provider) Build

func (gp *Provider) Build(config config.Credentials) provider.Provider

Build acts like the constructor for a provider

func (*Provider) GetClaims

func (gp *Provider) GetClaims(httpClient *http.Client) (jwt.MapClaims, error)

GetClaims returns a JWT Map Claim

Jump to

Keyboard shortcuts

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