http

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateToken

func ValidateToken(fun func(w http.ResponseWriter, r *http.Request),
	f interface{},
	srv *server.Server) func(w http.ResponseWriter, r *http.Request)

ValidateToken doc

Types

type OAuth2

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

OAuth2 doc @Summary @Struct OAuth2

func (*OAuth2) AddAuthClient

func (slf *OAuth2) AddAuthClient(id string, secret string, domain string, userid string)

AddAuthClient doc @Summary append authorization client @Method AddAuthClient @Param (string) client id @Param (string) secret @Param (string) domain @Param (string) user id

func (*OAuth2) Initial

func (slf *OAuth2) Initial()

Initial doc @Summary @Method Initial

func (*OAuth2) OnRequestAuth added in v1.1.0

func (slf *OAuth2) OnRequestAuth(w http.ResponseWriter, r *http.Request)

OnRequestAuth doc @Summary http request method @Method onRequestAuth @Param (http.ResponseWriter) @Param (http.Request)

func (*OAuth2) OnRequestAuthorization added in v1.1.0

func (slf *OAuth2) OnRequestAuthorization(w http.ResponseWriter, r *http.Request) error

func (*OAuth2) SetKey

func (slf *OAuth2) SetKey(v string)

SetKey doc @Summary Setting oauth2 token s256 key @Method SetKey @Param (string) key

func (*OAuth2) SetRefresh

func (slf *OAuth2) SetRefresh(v bool)

SetRefresh doc @Summary Setting oauth2 token reset refresh @Method SetRefresh @Param (bool) is refresh

func (*OAuth2) SetRefreshTokenExp

func (slf *OAuth2) SetRefreshTokenExp(v int)

SetRefreshTokenExp doc @Summary Setting oauth2 refresh token exp time @Method SetRefreshTokenExp @Param (int) refresh token exp time sec

func (*OAuth2) SetTokenExp

func (slf *OAuth2) SetTokenExp(v int)

SetTokenExp doc @Summary Setting oauth2 token exp time @Method SetTokenExp @Param (int) token exp time sec

Jump to

Keyboard shortcuts

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