fix 'subject' name in service-account claim

As indicated by
https://developers.google.com/identity/protocols/oauth2/service-account#httprest
the name for the subject-field inside the JWT claim needs to be named
'sub' (instead of 'subject').
This is relevant e.g. for the GSuite Admin Directory API.
This commit is contained in:
Elmar Athmer
2020-05-28 12:41:10 +02:00
committed by Elmar Athmer
parent 3221e8986a
commit 43c8a3d77d

View File

@@ -92,6 +92,7 @@ struct Claims<'a> {
aud: &'a str,
exp: i64,
iat: i64,
#[serde(rename = "sub")]
subject: Option<&'a str>,
scope: String,
}