jwt

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const AuthHeaderCtxKey = "authHeader"
View Source
const HeaderSpiffeValue = "X-Forwarded-Client-Cert"
View Source
const SpiffeCtxKey = "spiffe"
View Source
const TenantIdCtxKey = "tenantId"
View Source
const WebTokenCtxKey = "webToken"

Variables

This section is empty.

Functions

func GetSpiffeUrlValue

func GetSpiffeUrlValue(header http.Header) *string

func GetURIValue

func GetURIValue(headerVal string) string

Types

type IssuerAttributes

type IssuerAttributes struct {
	Issuer  string `json:"iss"`
	Subject string `json:"sub"`
}

type ParsedAttributes

type ParsedAttributes struct {
	Audiences []string `json:"aud"`
	Mail      string   `json:"mail,omitempty"`
}

ParsedAttributes exposes the claims which require of treatment on our side due to incompatibilities between IAS Applications

type UserAttributes

type UserAttributes struct {
	FirstName string `json:"first_name,omitempty"`
	LastName  string `json:"last_name,omitempty"`
}

UserAttributes contains the list of attributes sent to the application by the OIDC Provider

type WebToken

WebToken contains a deserialized id_token sent to the application by the IAS Tenant

func New

func New(idToken string, signatureAlgorithms []jose.SignatureAlgorithm) (webToken WebToken, err error)

New retrieves a new WebToken from an id_token string provided by OpenID communication When not able to parse or deserialize the requested claims, it will return an error JWT Claims are parsed without verification, ensure properer JWT verification before calling this function, eg. with istio

Jump to

Keyboard shortcuts

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