Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenGenerator ¶
type TokenGenerator interface { // GenerateToken generates a token which will identify the given // ServiceAccount. privateClaims is an interface that will be // serialized into the JWT payload JSON encoding at the root level of // the payload object. Public claims take precedent over private // claims i.e. if both claims and privateClaims have an "exp" field, // the value in claims will be used. GenerateToken(claims *jwt.Claims, privateClaims interface{}) (string, error) }
func JWTTokenGenerator ¶
func JWTTokenGenerator(iss string, privateKey interface{}) (TokenGenerator, error)
JWTTokenGenerator returns a TokenGenerator that generates signed JWT tokens, using the given privateKey. privateKey is a PEM-encoded byte array of a private RSA key.
Click to show internal directories.
Click to hide internal directories.