app

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MountJWTController

func MountJWTController(service *goa.Service, ctrl JWTController)

MountJWTController "mounts" a JWT resource controller on the given service.

Types

type Credentials

type Credentials struct {
	// Credentials: email
	Email *string `form:"email,omitempty" json:"email,omitempty" yaml:"email,omitempty" xml:"email,omitempty"`
	// Credentials: password
	Password *string `form:"password,omitempty" json:"password,omitempty" yaml:"password,omitempty" xml:"password,omitempty"`
	// Access scope (api:read, api:write)
	Scope *string `form:"scope,omitempty" json:"scope,omitempty" yaml:"scope,omitempty" xml:"scope,omitempty"`
}

Credentials user type.

type JWTController

type JWTController interface {
	goa.Muxer
	Signin(*SigninJWTContext) error
}

JWTController is the controller interface for the JWT actions.

type SigninJWTContext

type SigninJWTContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Payload *Credentials
}

SigninJWTContext provides the jwt signin action context.

func NewSigninJWTContext

func NewSigninJWTContext(ctx context.Context, r *http.Request, service *goa.Service) (*SigninJWTContext, error)

NewSigninJWTContext parses the incoming request URL and body, performs validations and creates the context used by the jwt controller signin action.

func (*SigninJWTContext) BadRequest

func (ctx *SigninJWTContext) BadRequest(r error) error

BadRequest sends a HTTP response with status code 400.

func (*SigninJWTContext) Created

func (ctx *SigninJWTContext) Created(r string) error

Created sends a HTTP response with status code 201.

func (*SigninJWTContext) InternalServerError

func (ctx *SigninJWTContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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