osprey

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2018 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadAndEncodeFile

func ReadAndEncodeFile(file string) (string, error)

ReadAndEncodeFile load the file contents and base64 encodes it

Types

type Osprey

type Osprey interface {
	// GetAccessToken will return an OIDC token if the request is valid
	GetAccessToken(ctx context.Context, username, password string) (*pb.LoginResponse, error)
	// Authorise handles the authorisation redirect callback from OAuth2 auth flow
	Authorise(ctx context.Context, code, state, failure string) (*pb.LoginResponse, error)
}

Osprey defines behaviour to initiate and handle an oauth2 flow

func NewServer

func NewServer(environment, secret, redirectURL, issuerHost, issuerPath, issuerCA, apiServerURL, apiServerCA string, client *http.Client) (Osprey, error)

NewServer returns a new osprey server

Jump to

Keyboard shortcuts

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