loginserver

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2018 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSignUpEmailConfirmation = errors.New(`sign up on WeDeploy requested: try "we login" once you confirm your email`)

ErrSignUpEmailConfirmation tells that sign up was canceled because user is signing up

Functions

This section is empty.

Types

type BasicAuth added in v1.2.1

type BasicAuth struct {
	Username string
	Password string
	Context  config.Context
}

BasicAuth credentials

func (*BasicAuth) GetOAuthToken added in v1.2.1

func (b *BasicAuth) GetOAuthToken(ctx context.Context) (token string, err error)

GetOAuthToken from a Basic Auth flow

type Service

type Service struct {
	Infrastructure string
	// contains filtered or unexported fields
}

Service server for receiving JSON Web Token

func (*Service) Credentials

func (s *Service) Credentials() (username string, token string, err error)

Credentials for authenticated user or error, it blocks until the information is available

func (*Service) Listen

func (s *Service) Listen(ctx context.Context) (address string, err error)

Listen for requests

func (*Service) Serve

func (s *Service) Serve() error

Serve HTTP requests

Jump to

Keyboard shortcuts

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