Documentation ¶
Index ¶
Constants ¶
View Source
const (
NerdTokenEnvVar = "NERD_TOKEN"
)
Variables ¶
This section is empty.
Functions ¶
func DecodeTokenWithKey ¶
DecodeTokenWithKey decodes a nerd token (JWT) and verifies it with the given public key.
func DecodeTokenWithPEM ¶
func DecodeTokenWithPEM(nerdToken, pem string) (*payload.NerdClaims, error)
DecodeTokenWithPEM decodes a nerd token (JWT) and verifies it with the given public key in PEM format.
Types ¶
type NerdAPI ¶
NerdAPI holds a reference to a nerdalize auth token. A credentials provider is needed to provide this value.
func NewNerdAPI ¶
NewNerdAPI creates a new credentials.NerdAPI struct.
func (*NerdAPI) Get ¶
func (n *NerdAPI) Get() (*NerdAPIValue, error)
Get the nerd token. This function checks with the provider whether the token is expired and if so retrieves a new token from the provider.
type NerdAPIValue ¶
type NerdAPIValue struct {
NerdToken string
}
NerdAPIValue is the value struct that contains credential values.
Click to show internal directories.
Click to hide internal directories.