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.
Click to show internal directories.
Click to hide internal directories.