types

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthFlow

type AuthFlow interface {
	Authorize(ctx context.Context) (*http.Request, error)
	CallbackHandler(*TokenResponseState, http.Handler) http.Handler
}

AuthFlow is an interface for OAuth authorization flows

type TokenResponseState

type TokenResponseState struct {
	AccessToken    string
	TokenType      string
	ExpiresIn      time.Duration
	RefreshToken   string
	CreatedAt      int64
	HTTPStatusCode int
	Err            error
}

TokenResponseState is used for passing state through HTTP middleware

func (*TokenResponseState) SetGitlabTokenResponse

func (t *TokenResponseState) SetGitlabTokenResponse(token internal.GitlabTokenResponse)

SetGitlabTokenResponse will modify the TokenResponseState and populate the relevant fields from a GitlabTokenResponse

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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