@@ -1162,6 +1162,25 @@ export class FusionAuthClient {
1162
1162
. go ( ) ;
1163
1163
}
1164
1164
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
+
1165
1184
/**
1166
1185
* Issue a new access token (JWT) for the requested Application after ensuring the provided JWT is valid. A valid
1167
1186
* access token is properly signed and not expired.
@@ -1277,25 +1296,6 @@ export class FusionAuthClient {
1277
1296
. go ( ) ;
1278
1297
}
1279
1298
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
-
1299
1299
/**
1300
1300
* Complete a login request using a passwordless code
1301
1301
*
0 commit comments