@compassdigital/sdk.typescript 4.145.0 → 4.146.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/base.js +1 -1
- package/lib/base.js.map +1 -1
- package/lib/index.d.ts +16 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +17 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/auth.d.ts +16 -4
- package/lib/interface/auth.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/base.ts +1 -1
- package/src/index.ts +44 -0
- package/src/interface/auth.ts +32 -4
package/src/index.ts
CHANGED
|
@@ -1256,6 +1256,10 @@ import {
|
|
|
1256
1256
|
PostAuthSsoExchangeResponse,
|
|
1257
1257
|
GetAuthSsoExchangeQuery,
|
|
1258
1258
|
GetAuthSsoExchangeResponse,
|
|
1259
|
+
PostAuthJwtAssertionBody,
|
|
1260
|
+
PostAuthJwtAssertionResponse,
|
|
1261
|
+
GetAuthJwtAssertionJwkQuery,
|
|
1262
|
+
GetAuthJwtAssertionJwkResponse,
|
|
1259
1263
|
} from './interface/auth';
|
|
1260
1264
|
|
|
1261
1265
|
import {
|
|
@@ -13193,6 +13197,46 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
13193
13197
|
return this.request('auth', '/auth/sso/exchange', 'GET', `/auth/sso/exchange`, null, options);
|
|
13194
13198
|
}
|
|
13195
13199
|
|
|
13200
|
+
/**
|
|
13201
|
+
* POST /auth/jwt-assertion - Generate a JWT assertion token for third-party authentication
|
|
13202
|
+
*
|
|
13203
|
+
* @param body
|
|
13204
|
+
* @param options - additional request options
|
|
13205
|
+
*/
|
|
13206
|
+
post_auth_jwt_assertion(
|
|
13207
|
+
body: PostAuthJwtAssertionBody,
|
|
13208
|
+
options?: RequestOptions,
|
|
13209
|
+
): ResponsePromise<PostAuthJwtAssertionResponse> {
|
|
13210
|
+
return this.request(
|
|
13211
|
+
'auth',
|
|
13212
|
+
'/auth/jwt-assertion',
|
|
13213
|
+
'POST',
|
|
13214
|
+
`/auth/jwt-assertion`,
|
|
13215
|
+
body,
|
|
13216
|
+
options,
|
|
13217
|
+
);
|
|
13218
|
+
}
|
|
13219
|
+
|
|
13220
|
+
/**
|
|
13221
|
+
* GET /auth/jwt-assertion/jwk - Get the public JWK for JWT assertion
|
|
13222
|
+
*
|
|
13223
|
+
* @param options - additional request options
|
|
13224
|
+
*/
|
|
13225
|
+
get_auth_jwt_assertion_jwk(
|
|
13226
|
+
options?: {
|
|
13227
|
+
query?: GetAuthJwtAssertionJwkQuery;
|
|
13228
|
+
} & RequestOptions,
|
|
13229
|
+
): ResponsePromise<GetAuthJwtAssertionJwkResponse> {
|
|
13230
|
+
return this.request(
|
|
13231
|
+
'auth',
|
|
13232
|
+
'/auth/jwt-assertion/jwk',
|
|
13233
|
+
'GET',
|
|
13234
|
+
`/auth/jwt-assertion/jwk`,
|
|
13235
|
+
null,
|
|
13236
|
+
options,
|
|
13237
|
+
);
|
|
13238
|
+
}
|
|
13239
|
+
|
|
13196
13240
|
/**
|
|
13197
13241
|
* GET /review - Get reviews by taxonomy
|
|
13198
13242
|
*
|
package/src/interface/auth.ts
CHANGED
|
@@ -134,10 +134,23 @@ export interface SSOExchangeDTO {
|
|
|
134
134
|
token: string;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
export interface
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
137
|
+
export interface JwtAssertionRequest {
|
|
138
|
+
// The intended audience for the JWT token (third party token endpoint)
|
|
139
|
+
audience: string;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export interface JwtAssertionResponse {
|
|
143
|
+
// The signed JWT assertion token
|
|
144
|
+
jwt: string;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface JwtAssertionJwkResponse {
|
|
148
|
+
// Key type
|
|
149
|
+
kty: string;
|
|
150
|
+
// Base64url-encoded exponent
|
|
151
|
+
e: string;
|
|
152
|
+
// Base64url-encoded modulus
|
|
153
|
+
n: string;
|
|
141
154
|
}
|
|
142
155
|
|
|
143
156
|
// POST /auth/flow - Determines the authentication flow for a user based on their email address
|
|
@@ -212,3 +225,18 @@ export interface GetAuthSsoExchangeQuery {
|
|
|
212
225
|
}
|
|
213
226
|
|
|
214
227
|
export type GetAuthSsoExchangeResponse = SSOAuthResponseDTO;
|
|
228
|
+
|
|
229
|
+
// POST /auth/jwt-assertion - Generate a JWT assertion token for third-party authentication
|
|
230
|
+
|
|
231
|
+
export type PostAuthJwtAssertionBody = JwtAssertionRequest;
|
|
232
|
+
|
|
233
|
+
export type PostAuthJwtAssertionResponse = JwtAssertionResponse;
|
|
234
|
+
|
|
235
|
+
// GET /auth/jwt-assertion/jwk - Get the public JWK for JWT assertion
|
|
236
|
+
|
|
237
|
+
export interface GetAuthJwtAssertionJwkQuery {
|
|
238
|
+
// Graphql query string
|
|
239
|
+
_query?: string;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export type GetAuthJwtAssertionJwkResponse = JwtAssertionJwkResponse;
|