jwt

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 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 Jwt

type Jwt struct {
	UserId         string                 `json:"sub"`
	ResourceAccess map[string]Resource    `json:"resource_access"`
	RealmAccess    Resource               `json:"realm_access"`
	Map            map[string]interface{} `json:"-"`
	Impersonate    JwtImpersonate         `json:"-"`
}

func GetJwt

func GetJwt(r *http.Request) (token Jwt, err error)

type JwtImpersonate

type JwtImpersonate string

func (JwtImpersonate) Delete

func (this JwtImpersonate) Delete(url string) (resp *http.Response, err error)

func (JwtImpersonate) Get

func (this JwtImpersonate) Get(url string) (resp *http.Response, err error)

func (JwtImpersonate) GetJSON

func (this JwtImpersonate) GetJSON(url string, result interface{}) (err error)

func (JwtImpersonate) Post

func (this JwtImpersonate) Post(url string, contentType string, body io.Reader) (resp *http.Response, err error)

func (JwtImpersonate) PostJSON

func (this JwtImpersonate) PostJSON(url string, body interface{}, result interface{}) (err error)

type Resource

type Resource struct {
	Roles []string `json:"roles"`
}

Jump to

Keyboard shortcuts

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