(self, auth, token_endpoint)
| 102 | alg = "RS256" |
| 103 | |
| 104 | def sign(self, auth, token_endpoint): |
| 105 | if isinstance(auth.client_secret, (RSAKey, ECKey, OKPKey)): |
| 106 | key = auth.client_secret |
| 107 | else: |
| 108 | key = RSAKey.import_key(auth.client_secret) |
| 109 | return private_key_jwt_sign( |
| 110 | key, |
| 111 | client_id=auth.client_id, |
| 112 | token_endpoint=token_endpoint, |
| 113 | claims=self.claims, |
| 114 | header=self.headers, |
| 115 | alg=self.alg, |
| 116 | ) |