@laserfiche/lf-api-client-core
Advanced tools
Comparing version
@@ -6,2 +6,3 @@ import { GetAccessTokenResponse } from './lib/OAuth/GetAccessTokenResponse.js'; | ||
import { JWK } from './lib/OAuth/JWK.js'; | ||
import { OAuthClientCustomTokenCredentialsHandler } from './lib/HttpHandlers/OAuthClientCustomTokenCredentialsHandler.js'; | ||
import { OAuthClientCredentialsHandler } from './lib/HttpHandlers/OAuthClientCredentialsHandler.js'; | ||
@@ -15,3 +16,3 @@ import { UsernamePasswordHandler } from './lib/HttpHandlers/UsernamePasswordHandler.js'; | ||
import { BeforeFetchResult } from './lib/HttpHandlers/BeforeFetchResult.js'; | ||
export { GetAccessTokenResponse, CreateConnectionRequest, SessionKeyInfo, createFromBase64EncodedAccessKey, createClientCredentialsAuthorizationJwt as createClientCredentials, AccessKey, JWK, OAuthClientCredentialsHandler, UsernamePasswordHandler, HttpRequestHandler, BeforeFetchResult }; | ||
export { GetAccessTokenResponse, CreateConnectionRequest, SessionKeyInfo, createFromBase64EncodedAccessKey, createClientCredentialsAuthorizationJwt as createClientCredentials, AccessKey, JWK, OAuthClientCredentialsHandler, OAuthClientCustomTokenCredentialsHandler, UsernamePasswordHandler, HttpRequestHandler, BeforeFetchResult }; | ||
export * as JwtUtils from './lib/utils/JwtUtils.js'; | ||
@@ -18,0 +19,0 @@ export * as DomainUtils from './lib/utils/DomainUtils.js'; |
import { createFromBase64EncodedAccessKey, createClientCredentialsAuthorizationJwt } from './lib/OAuth/AccessKey.js'; | ||
import { OAuthClientCustomTokenCredentialsHandler } from './lib/HttpHandlers/OAuthClientCustomTokenCredentialsHandler.js'; | ||
import { OAuthClientCredentialsHandler } from './lib/HttpHandlers/OAuthClientCredentialsHandler.js'; | ||
@@ -8,3 +9,3 @@ import { UsernamePasswordHandler } from './lib/HttpHandlers/UsernamePasswordHandler.js'; | ||
import { ApiException } from './lib/ApiException.js'; | ||
export { createFromBase64EncodedAccessKey, createClientCredentialsAuthorizationJwt as createClientCredentials, OAuthClientCredentialsHandler, UsernamePasswordHandler }; | ||
export { createFromBase64EncodedAccessKey, createClientCredentialsAuthorizationJwt as createClientCredentials, OAuthClientCredentialsHandler, OAuthClientCustomTokenCredentialsHandler, UsernamePasswordHandler }; | ||
import * as JwtUtils_1 from './lib/utils/JwtUtils.js'; | ||
@@ -11,0 +12,0 @@ export { JwtUtils_1 as JwtUtils }; |
@@ -40,2 +40,17 @@ /** | ||
/** | ||
* Returns Laserfiche domain from Laserfiche jwt claims | ||
* @param lfJwt | ||
* @returns | ||
* @example | ||
* ```typescript | ||
* const jwt : AccessTokenUtils.JWT = { | ||
* header: { 'typ': 'JWT'}, | ||
* payload: {'aud' : 'test_aud'}, | ||
* signature: '_signature' | ||
* } | ||
* getDomainFromLfJWT(jwt); // 'test_aud'; | ||
* ``` | ||
*/ | ||
export declare function getAudFromLfJWT(lfJwt: JWT): string; | ||
/** | ||
* Returns Laserfiche trustee id (user id) from Laserfiche jwt claims | ||
@@ -42,0 +57,0 @@ * @param lfJwt |
@@ -36,2 +36,19 @@ /** | ||
/** | ||
* Returns Laserfiche domain from Laserfiche jwt claims | ||
* @param lfJwt | ||
* @returns | ||
* @example | ||
* ```typescript | ||
* const jwt : AccessTokenUtils.JWT = { | ||
* header: { 'typ': 'JWT'}, | ||
* payload: {'aud' : 'test_aud'}, | ||
* signature: '_signature' | ||
* } | ||
* getDomainFromLfJWT(jwt); // 'test_aud'; | ||
* ``` | ||
*/ | ||
export function getAudFromLfJWT(lfJwt) { | ||
return lfJwt.payload['aud']; | ||
} | ||
/** | ||
* Returns Laserfiche trustee id (user id) from Laserfiche jwt claims | ||
@@ -38,0 +55,0 @@ * @param lfJwt |
{ | ||
"name": "@laserfiche/lf-api-client-core", | ||
"version": "1.1.14--preview-11262812111", | ||
"version": "1.1.14--preview-11281027646", | ||
"description": "", | ||
@@ -28,3 +28,3 @@ "main": "dist/index.js", | ||
"@types/jwk-to-pem": "^2.0.1", | ||
"@types/node": "^16.18.105", | ||
"@types/node": "^20.16.6", | ||
"babel-jest": "^28.1.3", | ||
@@ -31,0 +31,0 @@ "isomorphic-fetch": "^3.0.0", |
@@ -20,2 +20,2 @@ # Laserfiche API Client Core Library | ||
See the [.github/workflows/lf-api-client-core.yml](https://github.com/Laserfiche/lf-api-js/blob/HEAD/.github/workflows/lf-api-client-core.yml). | ||
See the [.github/workflows/main.yml](https://github.com/Laserfiche/lf-api-js/blob/HEAD/.github/workflows/main.yml). |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
85429
8.42%60
5.26%1419
9.58%