Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthMiddleware ¶
func AuthMiddleware(next http.Handler, getter IDTokenGetter) http.Handler
AuthMiddleware is a middleware for authentication by http.Handler.
func Authenticate ¶
Authenticate is a function that authenticates the request and returns a UserInfo.
Types ¶
type IDTokenGetter ¶
type IDTokenGetter interface { // GetIDToken returns ID token from request. // // For example, you can get it from query parameters or headers. GetIDToken(*http.Request) string }
IDTokenGetter is an interface for getting ID token from request.
type IdTokenGetterFromAuthHeader ¶ added in v1.0.0
type IdTokenGetterFromAuthHeader struct{}
IdTokenGetterFromAuthHeader is an implementation of IDTokenGetter.
func (*IdTokenGetterFromAuthHeader) GetIDToken ¶ added in v1.0.0
func (*IdTokenGetterFromAuthHeader) GetIDToken(r *http.Request) string
GetIDToken is a function that returns an IDToken from Authorization header.
Click to show internal directories.
Click to hide internal directories.