auth

package
v0.0.0-...-00f2437 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthExchangeHandler

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

AuthExchangeHandler implements resp.ResponderHandler by exchanging a GitHub OAuth temporary code for a longer lived GitHub auth token

func NewAuthExchangeHandler

func NewAuthExchangeHandler(ctx context.Context, logger golog.Logger, cfg config.Config) AuthExchangeHandler

NewAuthExchangeHandler creates a new AuthExchangeHandler

func (AuthExchangeHandler) Handle

Handle implements resp.ResponderHandler.Handle

type AuthExchangeRequest

type AuthExchangeRequest struct {
	// State is the state parameter returned in the GitHub redirect, used to prevent cross site forgery
	State string `json:"state" validate:"nonzero"`

	// Code is the temporary authentication code GitHub provides which can be swapped out for a longer living auth token
	Code string `json:"code" validate:"nonzero"`
}

AuthExchangeRequest is the format for an auth exchange request

type AuthLoginHandler

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

AuthLoginHandler implements resp.ResponderHandler by redirecting users to the GitHub OAuth login page

func NewAuthLoginHandler

func NewAuthLoginHandler(logger golog.Logger, cfg config.Config) AuthLoginHandler

NewAuthLoginHandler creates a new AuthLoginHandler

func (AuthLoginHandler) Handle

Handle implements resp.ResponderHandler.Handle

type ZenHubAppendHandler

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

ZenHubAppendHandler implements resp.ResponderHandler by appending a provided ZenHub authentication token to a provided API authentication token

func NewZenHubAppendHandler

func NewZenHubAppendHandler(logger golog.Logger, cfg config.Config) ZenHubAppendHandler

NewZenHubAppendHandler creates a new ZenHubAppendHandler

func (ZenHubAppendHandler) Handle

Handle implements resp.ResponderHandler.Handle

type ZenHubAppendRequest

type ZenHubAppendRequest struct {
	// AuthToken is an existing API authentication token
	AuthToken string `json:"auth_token" validate:"nonzero"`

	// ZenHubAuthToken is the ZenHub authentication token to append to the AuthToken
	ZenHubAuthToken string `json:"zenhub_auth_token" validate:"nonzero"`
}

ZenHubAppendRequest is the format of a ZenHub append request

Jump to

Keyboard shortcuts

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