http

package
v0.0.0-...-8450a52 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorization

type Authorization interface {
	GrantAuthorizationCode(ktx kontext.Context, authorizationReq entity.AuthorizationRequestJSON) (interface{}, jsonapi.Errors)
	GrantToken(ktx kontext.Context, accessTokenReq entity.AccessTokenRequestJSON) (entity.OauthAccessTokenJSON, jsonapi.Errors)
	RevokeToken(ktx kontext.Context, revokeAccessTokenReq entity.RevokeAccessTokenRequestJSON) jsonapi.Errors
}

type GrantController

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

GrantController control flow of grant access token / authorization code

func NewGrant

func NewGrant(authorizationUsecase Authorization, apiError module.ApiError) *GrantController

NewGrant return struct ob GrantController

func (*GrantController) Control

func (o *GrantController) Control(ktx kontext.Context, c *gin.Context)

Control granting access token / authorization code

func (*GrantController) Method

func (o *GrantController) Method() string

Method Post

func (*GrantController) Path

func (o *GrantController) Path() string

Path /oauth/authorizations

type RevokeController

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

RevokeController control flow of revoking access token

func NewRevoke

func NewRevoke(authorizationUsecase Authorization, apiError module.ApiError) *RevokeController

NewRevoke create new revoke controller

func (*RevokeController) Control

func (o *RevokeController) Control(ktx kontext.Context, c *gin.Context)

Control revoking access token

func (*RevokeController) Method

func (o *RevokeController) Method() string

Method POST

func (*RevokeController) Path

func (o *RevokeController) Path() string

Path /oauth/authorizations/revoke

type TokenController

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

TokenController control flow of creating access token

func NewToken

func NewToken(authorizationUsecase Authorization, apiError module.ApiError) *TokenController

NewToken create new token controller

func (*TokenController) Control

func (o *TokenController) Control(ktx kontext.Context, c *gin.Context)

Control creating access token based on access token request

func (*TokenController) Method

func (o *TokenController) Method() string

Method POST

func (*TokenController) Path

func (o *TokenController) Path() string

Path /oauth/authorizations/token

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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