Skip to content

Commit

Permalink
Merge pull request #34 from adirburke/master
Browse files Browse the repository at this point in the history
Adding the subscription field to the JWT
  • Loading branch information
Andrewangeta authored Apr 29, 2021
2 parents 53bf5cd + e789e29 commit b7bb15a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Core/Sources/Configuration/OAuth/OAuthServiceAccount.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class OAuthServiceAccount: OAuthRefreshable {
scope: scope,
aud: AudienceClaim(value: GoogleOAuthTokenAudience),
exp: ExpirationClaim(value: Date().addingTimeInterval(3600)),
iat: IssuedAtClaim(value: Date()))
iat: IssuedAtClaim(value: Date()), sub: subscription)
let privateKey = try RSAKey.private(pem: credentials.privateKey.data(using: .utf8, allowLossyConversion: true) ?? Data())
return try JWTSigner.rs256(key: privateKey).sign(payload)
}
Expand Down

0 comments on commit b7bb15a

Please sign in to comment.