Skip to content

Commit af8c70e

Browse files
committed
fixup! docs: document client authentication
1 parent 6f1a33a commit af8c70e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

docs/api/handlers/token-handler.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Token Handler.
4444
Get the client from the model.
4545

4646
Client authentication is delegated to the configured authentication
47-
methods (see [module:client-authentication](module:client-authentication)). The single method
47+
methods (see the client authentication guide). The single method
4848
that matches the request resolves and verifies the client; supported out
4949
of the box are HTTP Basic, request-body credentials and public clients,
5050
plus any methods added via `extendedClientAuthentication` (e.g. JWT

docs/guide/client-authentication.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Content-Type: application/x-www-form-urlencoded
177177
grant_type=client_credentials
178178
&scope=read
179179
&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer
180-
&client_assertion=eyJhbGciOiJSUzI1Niİ...
180+
&client_assertion=eyJhbGciOiJSUzI1Ni...
181181
```
182182

183183
A client can build the assertion with [`jose`](https://github.com/panva/jose):
@@ -199,7 +199,7 @@ const clientAssertion = await new SignJWT({})
199199

200200
## Writing a custom method
201201

202-
Implement the [`AbstractClientAuthentication`](../api/server.md) port and register it through
202+
Implement the [`AbstractClientAuthentication`](../api/client-authentication/abstract-client-authentication) port and register it through
203203
`extendedClientAuthentication`. For example, a minimal `tls_client_auth` (mTLS) adapter:
204204

205205
```js
@@ -214,7 +214,7 @@ class TlsClientAuthentication extends AbstractClientAuthentication {
214214
matches (request) { return !!request.get('x-ssl-client-cert') }
215215

216216
// The `token_endpoint_auth_method` this request presents (for pinning).
217-
presentedMethod () { return 'tls_client_auth' }
217+
presentedMethod (request) { return 'tls_client_auth' }
218218

219219
// Verify the credentials and resolve the client (throw InvalidClientError on failure).
220220
async authenticate (request, { model }) {

0 commit comments

Comments
 (0)