The intended audience for theĪdditional_claims ( Mapping ) – Any additional claims for Signer ( ) – The signer used to sign JWTs.Īudience ( str) – the aud claim. with_claims ( audience = new_audience ) Parameters New_audience = ( '' ) new_credentials = credentials. To create JWT credentials using a Google service account private key One of the helper constructors as shown in the next section. Usually, you’ll construct these credentials with The constructor arguments determine the claims for the JWT that is These credentials require an “audience” claim. class Credentials ( signer, issuer, subject, audience, additional_claims=None, token_lifetime=3600 ) ¶īases:, Ĭredentials that use a JWT as the bearer token. ValueError – if any verification checks failed. The deserialized JSON payload in the JWT. If None then the JWT’s ‘aud’ parameter is not verified. Verify ( bool) – Whether to perform signature and claim validation.Īudience ( str) – The audience claim, ‘aud’, that this JWT shouldĬontain. The mapping must contain the same key ID that’s specified It must be a mapping of key IDs to public key certificates in PEMįormat. It must the the public key certificate in PEM format. Mapping decode ( token, certs=None, verify=True, audience=None ) ¶Ĭerts ( Union ] ]) – TheĬertificate used to validate the JWT signature. The header in order to acquire the appropriate certificate to verify This is useful to extract the key id from Specified it will override the signer’s key id. Signer has a key id it will be used as the default. Key_id ( str) – The key id to add to the JWT header. Header ( Mapping ) – Additional JWT header payload. Signer ( ) – The signer used to sign the JWT. decode ( encoded, verify = False ) encode ( signer, payload, header=None, key_id=None ) ¶
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |