keycloak

package
v0.2024.4 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package keycloak verifies tokens issued by the Keycloak identity server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOIDCTokenValidator

func NewOIDCTokenValidator(cfg Config) token.Validator

NewOIDCTokenValidator returns a token.Validator like NewTokenValidator using well known OIDC configuration for available keys.

func NewTokenValidator

func NewTokenValidator(config *Config, keySet jwks.KeySet) token.Validator

NewTokenValidator returns a token.Validator that validates tokens against the given jwks.KeySet which should be hosted by Keycloak. During validation known Keycloak claims are validated, converted into token.Claims, and returned.

Types

type Config

type Config struct {
	URL      string `json:"url,omitempty"` // Root URL of Keycloak server
	Realm    string `json:"realm,omitempty"`
	ClientID string `json:"clientId,omitempty"`
}

func (*Config) Issuer

func (c *Config) Issuer() string

Jump to

Keyboard shortcuts

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