authentication

package
v0.0.0-...-863bfbd Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnauthorized = errors.New("")

Functions

func New

func New(adapter container.HttpAdapter, clientId, clientSecret string) *authService

Types

type Authentication

type Authentication struct {
	ClientId     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	GrantType    string `json:"grant_type"`
	Username     string `json:"username"`
	Password     string `json:"password"`
}

type Credentials

type Credentials struct {
	Key            string
	ExpirationDate time.Time
}

type Service

type Service interface {
	Authenticate(username, password string) (*Credentials, error)
}

Jump to

Keyboard shortcuts

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