Skip to content

Commit d9821c3

Browse files
committed
1 parent 86cbecd commit d9821c3

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

src/FusionAuthClient.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,6 +1162,25 @@ export class FusionAuthClient {
11621162
.go();
11631163
}
11641164

1165+
/**
1166+
* Inspect an access token issued by FusionAuth.
1167+
*
1168+
* @param {string} client_id The unique client identifier. The client Id is the Id of the FusionAuth Application for which this token was generated.
1169+
* @param {string} token The access token returned by this OAuth provider as the result of a successful authentication.
1170+
* @returns {Promise<ClientResponse<IntrospectResponse>>}
1171+
*/
1172+
introspectAccessToken(client_id: string, token: string): Promise<ClientResponse<IntrospectResponse>> {
1173+
let body = new URLSearchParams();
1174+
1175+
body.append('client_id', client_id);
1176+
body.append('token', token);
1177+
return this.startAnonymous<IntrospectResponse, OAuthError>()
1178+
.withUri('/oauth2/introspect')
1179+
.withFormData(body)
1180+
.withMethod("POST")
1181+
.go();
1182+
}
1183+
11651184
/**
11661185
* Issue a new access token (JWT) for the requested Application after ensuring the provided JWT is valid. A valid
11671186
* access token is properly signed and not expired.
@@ -1277,25 +1296,6 @@ export class FusionAuthClient {
12771296
.go();
12781297
}
12791298

1280-
/**
1281-
* Inspect an access token issued by FusionAuth.
1282-
*
1283-
* @param {string} client_id The unique client identifier. The client Id is the Id of the FusionAuth Application for which this token was generated.
1284-
* @param {string} token The access token returned by this OAuth provider as the result of a successful authentication.
1285-
* @returns {Promise<ClientResponse<IntrospectResponse>>}
1286-
*/
1287-
oauth2Introspect(client_id: string, token: string): Promise<ClientResponse<IntrospectResponse>> {
1288-
let body = new URLSearchParams();
1289-
1290-
body.append('client_id', client_id);
1291-
body.append('token', token);
1292-
return this.startAnonymous<IntrospectResponse, OAuthError>()
1293-
.withUri('/oauth2/introspect')
1294-
.withFormData(body)
1295-
.withMethod("POST")
1296-
.go();
1297-
}
1298-
12991299
/**
13001300
* Complete a login request using a passwordless code
13011301
*

0 commit comments

Comments
 (0)