token

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserAudience = "user-auth.chainloop"
	APIAudience  = "api-token-auth.chainloop"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ParsedToken

type ParsedToken struct {
	ID        string
	OrgID     string
	TokenType v1.Attestation_Auth_AuthType
}

func Parse

func Parse(token string) (*ParsedToken, error)

Parse the token and return the type of token. At the moment in Chainloop we have 3 types of tokens: 1. User account token 2. API token 3. Federated token Each one of them have an associated audience claim that we use to identify the type of token. If the token is not present, nor we cannot match it with one of the expected audience, return nil.

Jump to

Keyboard shortcuts

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