(key, client_id, token_endpoint, alg, claims=None, **kwargs)
| 60 | |
| 61 | |
| 62 | def _sign(key, client_id, token_endpoint, alg, claims=None, **kwargs): |
| 63 | # REQUIRED. Issuer. This MUST contain the client_id of the OAuth Client. |
| 64 | issuer = client_id |
| 65 | # REQUIRED. Subject. This MUST contain the client_id of the OAuth Client. |
| 66 | subject = client_id |
| 67 | # The Audience SHOULD be the URL of the Authorization Server's Token Endpoint. |
| 68 | audience = token_endpoint |
| 69 | |
| 70 | # jti is required |
| 71 | if claims is None: |
| 72 | claims = {} |
| 73 | if "jti" not in claims: |
| 74 | claims["jti"] = generate_token(36) |
| 75 | |
| 76 | return sign_jwt_bearer_assertion( |
| 77 | key=key, |
| 78 | issuer=issuer, |
| 79 | audience=audience, |
| 80 | subject=subject, |
| 81 | claims=claims, |
| 82 | alg=alg, |
| 83 | **kwargs, |
| 84 | ) |
no test coverage detected
searching dependent graphs…