token

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const CERTS_URL = "%s/auth/realms/%s/protocol/openid-connect/certs"

Variables

This section is empty.

Functions

func GetPublicKey

func GetPublicKey(host string, realm string) (token string, err error)

func VerifyToken

func VerifyToken(keycloakToken string, keyString string) (bool, error)

Types

type Key

type Key struct {
	Kid string   `json:"kid"`
	Kty string   `json:"kty"`
	Alg string   `json:"alg"`
	Use string   `json:"use"`
	N   string   `json:"n"`
	E   string   `json:"e"`
	X5c []string `json:"x5c"`
	X5t string   `json:"x5t"`
}

type Keys

type Keys struct {
	Keys []Key `json:"keys"`
}

Jump to

Keyboard shortcuts

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