-
-
Notifications
You must be signed in to change notification settings - Fork 54
/
private_key_jwt.diff
31 lines (27 loc) · 1021 Bytes
/
private_key_jwt.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
diff --git a/examples/oauth.ts b/examples/private_key_jwt.ts
index d55e62d..8bf4f3a 100644
--- a/examples/oauth.ts
+++ b/examples/private_key_jwt.ts
@@ -9,12 +9,16 @@ let algorithm!:
| 'oidc' /* For .well-known/openid-configuration discovery */
| undefined /* Defaults to 'oidc' */
let client_id!: string
-let client_secret!: string
/**
* Value used in the authorization request as redirect_uri pre-registered at the Authorization
* Server.
*/
let redirect_uri!: string
+/**
+ * A key that the client has pre-registered at the Authorization Server for use with Private Key JWT
+ * client authentication method.
+ */
+let clientPrivateKey!: oauth.CryptoKey
// End of prerequisites
@@ -23,7 +27,7 @@ const as = await oauth
.then((response) => oauth.processDiscoveryResponse(issuer, response))
const client: oauth.Client = { client_id }
-const clientAuth = oauth.ClientSecretPost(client_secret)
+const clientAuth = oauth.PrivateKeyJwt(clientPrivateKey)
const code_challenge_method = 'S256'
/**