@adatechnology/auth-keycloak 0.0.1 → 0.0.2
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/dist/{src/keycloak.interface.d.ts → index.d.mts} +17 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +31 -14940
- package/dist/index.mjs +24 -14952
- package/package.json +11 -6
- package/dist/src/index.d.ts +0 -3
- package/dist/src/index.js +0 -2
- package/dist/src/keycloak.client.d.ts +0 -20
- package/dist/src/keycloak.client.js +0 -140
- package/dist/src/keycloak.http.interceptor.d.ts +0 -11
- package/dist/src/keycloak.http.interceptor.js +0 -39
- package/dist/src/keycloak.interface.js +0 -1
- package/dist/src/keycloak.module.d.ts +0 -6
- package/dist/src/keycloak.module.js +0 -40
- package/dist/src/keycloak.token.d.ts +0 -3
- package/dist/src/keycloak.token.js +0 -3
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { DynamicModule } from '@nestjs/common';
|
|
2
|
+
import { AxiosRequestConfig, AxiosInstance } from 'axios';
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
5
|
* Keycloak token response
|
|
3
6
|
*/
|
|
4
|
-
|
|
7
|
+
interface KeycloakTokenResponse {
|
|
5
8
|
access_token: string;
|
|
6
9
|
expires_in: number;
|
|
7
10
|
refresh_expires_in: number;
|
|
@@ -14,7 +17,7 @@ export interface KeycloakTokenResponse {
|
|
|
14
17
|
/**
|
|
15
18
|
* Keycloak client credentials
|
|
16
19
|
*/
|
|
17
|
-
|
|
20
|
+
interface KeycloakCredentials {
|
|
18
21
|
clientId: string;
|
|
19
22
|
clientSecret: string;
|
|
20
23
|
username?: string;
|
|
@@ -24,7 +27,7 @@ export interface KeycloakCredentials {
|
|
|
24
27
|
/**
|
|
25
28
|
* Keycloak configuration
|
|
26
29
|
*/
|
|
27
|
-
|
|
30
|
+
interface KeycloakConfig {
|
|
28
31
|
baseUrl: string;
|
|
29
32
|
realm: string;
|
|
30
33
|
credentials: KeycloakCredentials;
|
|
@@ -32,7 +35,7 @@ export interface KeycloakConfig {
|
|
|
32
35
|
/**
|
|
33
36
|
* Keycloak client interface
|
|
34
37
|
*/
|
|
35
|
-
|
|
38
|
+
interface KeycloakClientInterface {
|
|
36
39
|
/**
|
|
37
40
|
* Get access token
|
|
38
41
|
*/
|
|
@@ -50,3 +53,13 @@ export interface KeycloakClientInterface {
|
|
|
50
53
|
*/
|
|
51
54
|
getUserInfo(token: string): Promise<any>;
|
|
52
55
|
}
|
|
56
|
+
|
|
57
|
+
declare class KeycloakModule {
|
|
58
|
+
static forRoot(config: KeycloakConfig, httpConfig?: AxiosRequestConfig | AxiosInstance): DynamicModule;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
declare const KEYCLOAK_CONFIG = "KEYCLOAK_CONFIG";
|
|
62
|
+
declare const KEYCLOAK_CLIENT = "KEYCLOAK_CLIENT";
|
|
63
|
+
declare const KEYCLOAK_HTTP_INTERCEPTOR = "KEYCLOAK_HTTP_INTERCEPTOR";
|
|
64
|
+
|
|
65
|
+
export { KEYCLOAK_CLIENT, KEYCLOAK_CONFIG, KEYCLOAK_HTTP_INTERCEPTOR, type KeycloakClientInterface, type KeycloakConfig, KeycloakModule, type KeycloakTokenResponse };
|
package/dist/index.d.ts
CHANGED
|
@@ -62,4 +62,4 @@ declare const KEYCLOAK_CONFIG = "KEYCLOAK_CONFIG";
|
|
|
62
62
|
declare const KEYCLOAK_CLIENT = "KEYCLOAK_CLIENT";
|
|
63
63
|
declare const KEYCLOAK_HTTP_INTERCEPTOR = "KEYCLOAK_HTTP_INTERCEPTOR";
|
|
64
64
|
|
|
65
|
-
export { KEYCLOAK_CLIENT, KEYCLOAK_CONFIG, KEYCLOAK_HTTP_INTERCEPTOR, KeycloakClientInterface, KeycloakConfig, KeycloakModule, KeycloakTokenResponse };
|
|
65
|
+
export { KEYCLOAK_CLIENT, KEYCLOAK_CONFIG, KEYCLOAK_HTTP_INTERCEPTOR, type KeycloakClientInterface, type KeycloakConfig, KeycloakModule, type KeycloakTokenResponse };
|