jwt

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHandler

func GetHandler(ctx echo.Context) error

@Summary Get jwt passed as header. By default from Authorization bearer header of the request. @Tags JWT @Description Requests using GET should only retrieve data. @Accept json @Produce json @Param headerName query string false "if set, JWT is read from this header name. Otherwise from Authorization header" @Param jwksUri query string false "if set, the jwt is verified with the key received from jwks endpoint" @Success 200 {array} jwt.Response @Router /jwt [get]

Types

type Response

type Response struct {
	Raw               string                 `json:"raw"`
	Header            map[string]interface{} `json:"header"`
	Payload           map[string]interface{} `json:"payload"`
	Valid             *bool                  `json:"valid,omitempty"`
	VerifiedSignature *bool                  `json:"verifiedSignature,omitempty"`
}

func NewResponse

func NewResponse(rawToken string, keys jwk.Set) (*Response, error)

Jump to

Keyboard shortcuts

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