oidc

package
v0.0.0-...-d47a9da Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "oidc"

ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.

Variables

View Source
var MethodNames = [3]string{"required", "url", "authenticate"}

MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.

Functions

func MakeBadRequest

func MakeBadRequest(err error) *goa.ServiceError

MakeBadRequest builds a goa.ServiceError from an error.

func MakeForbidden

func MakeForbidden(err error) *goa.ServiceError

MakeForbidden builds a goa.ServiceError from an error.

func MakeNotFound

func MakeNotFound(err error) *goa.ServiceError

MakeNotFound builds a goa.ServiceError from an error.

func MakeUnauthorized

func MakeUnauthorized(err error) *goa.ServiceError

MakeUnauthorized builds a goa.ServiceError from an error.

func MakeUserUnverified

func MakeUserUnverified(err error) *goa.ServiceError

MakeUserUnverified builds a goa.ServiceError from an error.

func NewAuthenticateEndpoint

func NewAuthenticateEndpoint(s Service) goa.Endpoint

NewAuthenticateEndpoint returns an endpoint function that calls the method "authenticate" of service "oidc".

func NewRequiredEndpoint

func NewRequiredEndpoint(s Service) goa.Endpoint

NewRequiredEndpoint returns an endpoint function that calls the method "required" of service "oidc".

func NewURLEndpoint

func NewURLEndpoint(s Service) goa.Endpoint

NewURLEndpoint returns an endpoint function that calls the method "url" of service "oidc".

Types

type AuthenticatePayload

type AuthenticatePayload struct {
	State        string
	SessionState string
	Code         string
}

AuthenticatePayload is the payload type of the oidc service authenticate method.

type AuthenticateResult

type AuthenticateResult struct {
	Location string
	Token    string
	Header   string
}

AuthenticateResult is the result type of the oidc service authenticate method.

type Client

type Client struct {
	RequiredEndpoint     goa.Endpoint
	URLEndpoint          goa.Endpoint
	AuthenticateEndpoint goa.Endpoint
}

Client is the "oidc" service client.

func NewClient

func NewClient(required, url_, authenticate goa.Endpoint) *Client

NewClient initializes a "oidc" service client given the endpoints.

func (*Client) Authenticate

func (c *Client) Authenticate(ctx context.Context, p *AuthenticatePayload) (res *AuthenticateResult, err error)

Authenticate calls the "authenticate" endpoint of the "oidc" service.

func (*Client) Required

func (c *Client) Required(ctx context.Context, p *RequiredPayload) (res *RequiredResult, err error)

Required calls the "required" endpoint of the "oidc" service.

func (*Client) URL

func (c *Client) URL(ctx context.Context, p *URLPayload) (res *URLResult, err error)

URL calls the "url" endpoint of the "oidc" service.

type Endpoints

type Endpoints struct {
	Required     goa.Endpoint
	URL          goa.Endpoint
	Authenticate goa.Endpoint
}

Endpoints wraps the "oidc" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "oidc" service with endpoints.

func (*Endpoints) Use

func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint)

Use applies the given middleware to all the "oidc" service endpoints.

type RequiredPayload

type RequiredPayload struct {
	Token  *string
	Follow *bool
	After  *string
}

RequiredPayload is the payload type of the oidc service required method.

type RequiredResult

type RequiredResult struct {
	Location string
}

RequiredResult is the result type of the oidc service required method.

type Service

type Service interface {
	// Required implements required.
	Required(context.Context, *RequiredPayload) (res *RequiredResult, err error)
	// URL implements url.
	URL(context.Context, *URLPayload) (res *URLResult, err error)
	// Authenticate implements authenticate.
	Authenticate(context.Context, *AuthenticatePayload) (res *AuthenticateResult, err error)
}

Service is the oidc service interface.

type URLPayload

type URLPayload struct {
	Token  *string
	Follow *bool
	After  *string
}

URLPayload is the payload type of the oidc service url method.

type URLResult

type URLResult struct {
	Location string
}

URLResult is the result type of the oidc service url method.

Jump to

Keyboard shortcuts

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