handler

package
v0.0.0-...-b77be51 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2018 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIStub

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

APIStub represents an object containing a list of possible scenarios and the respective outcomes

func NewAPIStub

func NewAPIStub() (*APIStub, error)

NewAPIStub represents a stubbed version of zebedee for authenticating a user or service

func (*APIStub) CreateServiceAccount

func (api *APIStub) CreateServiceAccount(w http.ResponseWriter, r *http.Request)

CreateServiceAccount mocks the response for creating a cervice account

func (*APIStub) Identify

func (api *APIStub) Identify(w http.ResponseWriter, r *http.Request)

Identify represents a stubbed version of authenticating a service or user based on the scenario the request matches

type Response

type Response struct {
	Identifier string `json:"identifier,omitempty"`
	Message    string `json:"message,omitempty"`
	Name       string `json:"name,omitempty"`
	Token      string `json:"token,omitempty"`
	Status     int    `json:"-"`
}

Response represents the json body returned on requesting an identity check

type Scenarios

type Scenarios struct {
	Identities      []identityProfile `yaml:"identities"`
	Services        []string          `yaml:"services"`
	NewServiceToken string            `yaml:"new-service-token"`
}

Scenarios represents a list of identities and services configured on application startup via a yml file

Jump to

Keyboard shortcuts

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