diff --git a/jwt/jwt.go b/jwt/jwt.go index 99f3e0a..6d5fd61 100644 --- a/jwt/jwt.go +++ b/jwt/jwt.go @@ -66,6 +66,9 @@ type Config struct { // request. If empty, the value of TokenURL is used as the // intended audience. Audience string + + // PrivateClaims optionally specifies private claims in the JWT. + PrivateClaims map[string]interface{} } // TokenSource returns a JWT TokenSource using the configuration @@ -100,6 +103,7 @@ func (js jwtSource) Token() (*oauth2.Token, error) { Iss: js.conf.Email, Scope: strings.Join(js.conf.Scopes, " "), Aud: js.conf.TokenURL, + PrivateClaims: js.conf.PrivateClaims, } if subject := js.conf.Subject; subject != "" { claimSet.Sub = subject