osprey

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2019 License: BSD-3-Clause Imports: 14 Imported by: 9

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)
	// Ready returns false if the oidcProvider has not been created
	Ready(ctx context.Context) 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