@flusys/nestjs-auth 8.1.3 → 8.1.5
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/fesm/24.js +12 -6
- package/fesm/helpers/index.js +12 -6
- package/fesm/index.js +5 -2
- package/helpers/token.helper.d.ts +1 -0
- package/package.json +3 -3
- package/services/authentication.service.d.ts +0 -1
package/fesm/24.js
CHANGED
|
@@ -232,8 +232,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
232
232
|
|
|
233
233
|
},
|
|
234
234
|
1379(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
235
|
-
function
|
|
236
|
-
|
|
235
|
+
function generateAccessToken(jwtService, authConfig, payload) {
|
|
236
|
+
return jwtService.sign({
|
|
237
237
|
...payload,
|
|
238
238
|
type: 'access'
|
|
239
239
|
}, {
|
|
@@ -241,6 +241,9 @@ function generateTokens(jwtService, authConfig, payload) {
|
|
|
241
241
|
expiresIn: authConfig.getJwtExpiration(),
|
|
242
242
|
algorithm: 'HS256'
|
|
243
243
|
});
|
|
244
|
+
}
|
|
245
|
+
function generateTokens(jwtService, authConfig, payload) {
|
|
246
|
+
const accessToken = generateAccessToken(jwtService, authConfig, payload);
|
|
244
247
|
const refreshToken = jwtService.sign({
|
|
245
248
|
...payload,
|
|
246
249
|
type: 'refresh'
|
|
@@ -274,8 +277,9 @@ function parseExpiryToMs(expiry) {
|
|
|
274
277
|
}
|
|
275
278
|
|
|
276
279
|
__webpack_require__.d(__webpack_exports__, {
|
|
280
|
+
Vg: () => (generateAccessToken),
|
|
277
281
|
e: () => (generateTokens),
|
|
278
|
-
|
|
282
|
+
om: () => (parseExpiryToMs)
|
|
279
283
|
});
|
|
280
284
|
|
|
281
285
|
|
|
@@ -2075,7 +2079,7 @@ class AuthenticationService {
|
|
|
2075
2079
|
}
|
|
2076
2080
|
}
|
|
2077
2081
|
}
|
|
2078
|
-
const
|
|
2082
|
+
const accessToken = (0,token_helper/* .generateAccessToken */.Vg)(this.jwtService, this.authConfig, {
|
|
2079
2083
|
id: user.id,
|
|
2080
2084
|
email: user.email,
|
|
2081
2085
|
type: 'access',
|
|
@@ -2091,7 +2095,9 @@ class AuthenticationService {
|
|
|
2091
2095
|
companyId: payload.companyId ?? null,
|
|
2092
2096
|
branchId: payload.branchId ?? null
|
|
2093
2097
|
});
|
|
2094
|
-
return
|
|
2098
|
+
return {
|
|
2099
|
+
accessToken
|
|
2100
|
+
};
|
|
2095
2101
|
} catch {
|
|
2096
2102
|
throw new common_.UnauthorizedException({
|
|
2097
2103
|
message: 'Invalid or expired refresh token',
|
|
@@ -2130,7 +2136,7 @@ class AuthenticationService {
|
|
|
2130
2136
|
const revokedAt = Math.floor(Date.now() / 1000);
|
|
2131
2137
|
const cacheKey = `${auth_constants/* .TOKEN_REVOKED_PREFIX */.EV}:${userId}`;
|
|
2132
2138
|
const refreshTokenExpiry = this.authConfig.getRefreshTokenExpiration();
|
|
2133
|
-
const ttlMs = (0,token_helper/* .parseExpiryToMs */.
|
|
2139
|
+
const ttlMs = (0,token_helper/* .parseExpiryToMs */.om)(refreshTokenExpiry);
|
|
2134
2140
|
await this.cacheManager.set(cacheKey, revokedAt, ttlMs);
|
|
2135
2141
|
await (0,classes_.publishDomainEvent)({
|
|
2136
2142
|
module: (/* inlined export .AUTH_EVENT_MODULE */"auth"),
|
package/fesm/helpers/index.js
CHANGED
|
@@ -46,15 +46,16 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
46
46
|
$C: () => (/* reexport safe */ _auth_response_mapper_js__rspack_import_0.$C),
|
|
47
47
|
FV: () => (/* reexport safe */ _auth_response_mapper_js__rspack_import_0.FV),
|
|
48
48
|
QH: () => (/* reexport safe */ _auth_response_mapper_js__rspack_import_0.QH),
|
|
49
|
+
Vg: () => (/* reexport safe */ _token_helper_js__rspack_import_1.Vg),
|
|
49
50
|
e: () => (/* reexport safe */ _token_helper_js__rspack_import_1.e),
|
|
50
|
-
om: () => (/* reexport safe */ _token_helper_js__rspack_import_1.
|
|
51
|
+
om: () => (/* reexport safe */ _token_helper_js__rspack_import_1.om)
|
|
51
52
|
});
|
|
52
53
|
|
|
53
54
|
|
|
54
55
|
},
|
|
55
56
|
1379(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
56
|
-
function
|
|
57
|
-
|
|
57
|
+
function generateAccessToken(jwtService, authConfig, payload) {
|
|
58
|
+
return jwtService.sign({
|
|
58
59
|
...payload,
|
|
59
60
|
type: 'access'
|
|
60
61
|
}, {
|
|
@@ -62,6 +63,9 @@ function generateTokens(jwtService, authConfig, payload) {
|
|
|
62
63
|
expiresIn: authConfig.getJwtExpiration(),
|
|
63
64
|
algorithm: 'HS256'
|
|
64
65
|
});
|
|
66
|
+
}
|
|
67
|
+
function generateTokens(jwtService, authConfig, payload) {
|
|
68
|
+
const accessToken = generateAccessToken(jwtService, authConfig, payload);
|
|
65
69
|
const refreshToken = jwtService.sign({
|
|
66
70
|
...payload,
|
|
67
71
|
type: 'refresh'
|
|
@@ -95,8 +99,9 @@ function parseExpiryToMs(expiry) {
|
|
|
95
99
|
}
|
|
96
100
|
|
|
97
101
|
__webpack_require__.d(__webpack_exports__, {
|
|
102
|
+
Vg: () => (generateAccessToken),
|
|
98
103
|
e: () => (generateTokens),
|
|
99
|
-
|
|
104
|
+
om: () => (parseExpiryToMs)
|
|
100
105
|
});
|
|
101
106
|
|
|
102
107
|
|
|
@@ -107,9 +112,10 @@ import { __webpack_require__ } from '../runtime.js';
|
|
|
107
112
|
var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
|
|
108
113
|
import * as __rspack_chunk_1 from './index.js';
|
|
109
114
|
__webpack_require__.C(__rspack_chunk_1);
|
|
110
|
-
var __webpack_exports__ = __webpack_exec__(892);var
|
|
115
|
+
var __webpack_exports__ = __webpack_exec__(892);var __webpack_exports__generateAccessToken = __webpack_exports__.Vg;
|
|
116
|
+
var __webpack_exports__generateTokens = __webpack_exports__.e;
|
|
111
117
|
var __webpack_exports__parseExpiryToMs = __webpack_exports__.om;
|
|
112
118
|
var __webpack_exports__toBranchInfo = __webpack_exports__.QH;
|
|
113
119
|
var __webpack_exports__toCompanyInfo = __webpack_exports__.$C;
|
|
114
120
|
var __webpack_exports__toUserInfo = __webpack_exports__.FV;
|
|
115
|
-
export { __webpack_exports__generateTokens as generateTokens, __webpack_exports__parseExpiryToMs as parseExpiryToMs, __webpack_exports__toBranchInfo as toBranchInfo, __webpack_exports__toCompanyInfo as toCompanyInfo, __webpack_exports__toUserInfo as toUserInfo };
|
|
121
|
+
export { __webpack_exports__generateAccessToken as generateAccessToken, __webpack_exports__generateTokens as generateTokens, __webpack_exports__parseExpiryToMs as parseExpiryToMs, __webpack_exports__toBranchInfo as toBranchInfo, __webpack_exports__toCompanyInfo as toCompanyInfo, __webpack_exports__toUserInfo as toUserInfo };
|
package/fesm/index.js
CHANGED
|
@@ -661,8 +661,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
661
661
|
$C: () => (/* reexport safe */ _auth_response_mapper_js__rspack_import_0.$C),
|
|
662
662
|
FV: () => (/* reexport safe */ _auth_response_mapper_js__rspack_import_0.FV),
|
|
663
663
|
QH: () => (/* reexport safe */ _auth_response_mapper_js__rspack_import_0.QH),
|
|
664
|
+
Vg: () => (/* reexport safe */ _token_helper_js__rspack_import_1.Vg),
|
|
664
665
|
e: () => (/* reexport safe */ _token_helper_js__rspack_import_1.e),
|
|
665
|
-
om: () => (/* reexport safe */ _token_helper_js__rspack_import_1.
|
|
666
|
+
om: () => (/* reexport safe */ _token_helper_js__rspack_import_1.om)
|
|
666
667
|
});
|
|
667
668
|
|
|
668
669
|
|
|
@@ -778,6 +779,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
778
779
|
Li: () => (/* reexport */ entities/* .UserToken */.Li),
|
|
779
780
|
KI: () => (/* reexport */ dtos/* .VerifyEmailDto */.rl),
|
|
780
781
|
aL: () => (/* reexport */ docs/* .authSwaggerConfig */.J),
|
|
782
|
+
Vg: () => (/* reexport */ helpers/* .generateAccessToken */.Vg),
|
|
781
783
|
e: () => (/* reexport */ helpers/* .generateTokens */.e),
|
|
782
784
|
QB: () => (/* reexport */ entities.getAuthEntitiesByConfig),
|
|
783
785
|
V8: () => (/* reexport */ social_provider_registry/* .getSocialProvider */.V),
|
|
@@ -1445,6 +1447,7 @@ var __webpack_exports__UserService = __webpack_exports__.DL;
|
|
|
1445
1447
|
var __webpack_exports__UserToken = __webpack_exports__.Li;
|
|
1446
1448
|
var __webpack_exports__VerifyEmailDto = __webpack_exports__.KI;
|
|
1447
1449
|
var __webpack_exports__authSwaggerConfig = __webpack_exports__.aL;
|
|
1450
|
+
var __webpack_exports__generateAccessToken = __webpack_exports__.Vg;
|
|
1448
1451
|
var __webpack_exports__generateTokens = __webpack_exports__.e;
|
|
1449
1452
|
var __webpack_exports__getAuthEntitiesByConfig = __webpack_exports__.QB;
|
|
1450
1453
|
var __webpack_exports__getSocialProvider = __webpack_exports__.V8;
|
|
@@ -1452,4 +1455,4 @@ var __webpack_exports__parseExpiryToMs = __webpack_exports__.om;
|
|
|
1452
1455
|
var __webpack_exports__toBranchInfo = __webpack_exports__.QH;
|
|
1453
1456
|
var __webpack_exports__toCompanyInfo = __webpack_exports__.$C;
|
|
1454
1457
|
var __webpack_exports__toUserInfo = __webpack_exports__.FV;
|
|
1455
|
-
export { __webpack_exports__AUTH_EMAIL_PROVIDER as AUTH_EMAIL_PROVIDER, __webpack_exports__AUTH_EVENT_ACTIONS as AUTH_EVENT_ACTIONS, __webpack_exports__AUTH_EVENT_ENTITIES as AUTH_EVENT_ENTITIES, __webpack_exports__AUTH_EVENT_MODULE as AUTH_EVENT_MODULE, __webpack_exports__AUTH_MESSAGES as AUTH_MESSAGES, __webpack_exports__AUTH_MODULE_OPTIONS as AUTH_MODULE_OPTIONS, __webpack_exports__AppUser as AppUser, __webpack_exports__AssignUserBranchDto as AssignUserBranchDto, __webpack_exports__AssignUserCompanyDto as AssignUserCompanyDto, __webpack_exports__AuthConfigService as AuthConfigService, __webpack_exports__AuthDataSourceProvider as AuthDataSourceProvider, __webpack_exports__AuthEmailService as AuthEmailService, __webpack_exports__AuthModule as AuthModule, __webpack_exports__AuthenticationController as AuthenticationController, __webpack_exports__AuthenticationService as AuthenticationService, __webpack_exports__BCRYPT_SALT_ROUNDS as BCRYPT_SALT_ROUNDS, __webpack_exports__BRANCH_MESSAGES as BRANCH_MESSAGES, __webpack_exports__BranchController as BranchController, __webpack_exports__BranchInfoDto as BranchInfoDto, __webpack_exports__BranchPermittedUserDto as BranchPermittedUserDto, __webpack_exports__BranchPermittedUsersResponseDto as BranchPermittedUsersResponseDto, __webpack_exports__BranchSelectionInfoDto as BranchSelectionInfoDto, __webpack_exports__BranchService as BranchService, __webpack_exports__COMPANY_MESSAGES as COMPANY_MESSAGES, __webpack_exports__ChangePasswordDto as ChangePasswordDto, __webpack_exports__ClearToken as ClearToken, __webpack_exports__Company as Company, __webpack_exports__CompanyBranch as CompanyBranch, __webpack_exports__CompanyBranchResponseDto as CompanyBranchResponseDto, __webpack_exports__CompanyController as CompanyController, __webpack_exports__CompanyInfoDto as CompanyInfoDto, __webpack_exports__CompanyPermittedUserDto as CompanyPermittedUserDto, __webpack_exports__CompanyPermittedUsersResponseDto as CompanyPermittedUsersResponseDto, __webpack_exports__CompanyResponseDto as CompanyResponseDto, __webpack_exports__CompanySelectionController as CompanySelectionController, __webpack_exports__CompanySelectionResponseDto as CompanySelectionResponseDto, __webpack_exports__CompanySelectionSessionService as CompanySelectionSessionService, __webpack_exports__CompanyService as CompanyService, __webpack_exports__CompanyWithBranchesDto as CompanyWithBranchesDto, __webpack_exports__CreateCompanyBranchDto as CreateCompanyBranchDto, __webpack_exports__CreateCompanyDto as CreateCompanyDto, __webpack_exports__CreateSocialAuthConfigDto as CreateSocialAuthConfigDto, __webpack_exports__CreateUserDto as CreateUserDto, __webpack_exports__DEFAULT_COOKIE_NAME as DEFAULT_COOKIE_NAME, __webpack_exports__EMAIL_VERIFICATION_MESSAGES as EMAIL_VERIFICATION_MESSAGES, __webpack_exports__EmailVerificationController as EmailVerificationController, __webpack_exports__ForgotPasswordDto as ForgotPasswordDto, __webpack_exports__GetBranchUsersDto as GetBranchUsersDto, __webpack_exports__GetCompanyUsersDto as GetCompanyUsersDto, __webpack_exports__JwtStrategy as JwtStrategy, __webpack_exports__LoginDto as LoginDto, __webpack_exports__LoginResponseDto as LoginResponseDto, __webpack_exports__LoginResponseRequiresEmailVerificationDto as LoginResponseRequiresEmailVerificationDto, __webpack_exports__MAX_COOKIE_BYTES as MAX_COOKIE_BYTES, __webpack_exports__MeResponseDto as MeResponseDto, __webpack_exports__PendingRegistration as PendingRegistration, __webpack_exports__PermissionItemDto as PermissionItemDto, __webpack_exports__PermissionType as PermissionType, __webpack_exports__RefreshTokenDto as RefreshTokenDto, __webpack_exports__RegistrationDto as RegistrationDto, __webpack_exports__RegistrationResponseDto as RegistrationResponseDto, __webpack_exports__ResendVerificationDto as ResendVerificationDto, __webpack_exports__ResetPasswordDto as ResetPasswordDto, __webpack_exports__SESSION_CACHE_PREFIX as SESSION_CACHE_PREFIX, __webpack_exports__SOCIAL_AUTH_CONFIG_MESSAGES as SOCIAL_AUTH_CONFIG_MESSAGES, __webpack_exports__SOCIAL_AUTH_MESSAGES as SOCIAL_AUTH_MESSAGES, __webpack_exports__SOCIAL_STATE_PREFIX as SOCIAL_STATE_PREFIX, __webpack_exports__SOCIAL_STATE_TTL_MS as SOCIAL_STATE_TTL_MS, __webpack_exports__SelectDto as SelectDto, __webpack_exports__SetToken as SetToken, __webpack_exports__SocialAuthConfig as SocialAuthConfig, __webpack_exports__SocialAuthConfigController as SocialAuthConfigController, __webpack_exports__SocialAuthConfigResponseDto as SocialAuthConfigResponseDto, __webpack_exports__SocialAuthConfigService as SocialAuthConfigService, __webpack_exports__SocialAuthController as SocialAuthController, __webpack_exports__SocialAuthService as SocialAuthService, __webpack_exports__SocialAuthorizeDto as SocialAuthorizeDto, __webpack_exports__SocialAuthorizeResponseDto as SocialAuthorizeResponseDto, __webpack_exports__SocialCallbackDto as SocialCallbackDto, __webpack_exports__SocialProviderInfoDto as SocialProviderInfoDto, __webpack_exports__SocialProviderTypeEnum as SocialProviderTypeEnum, __webpack_exports__SocialProvidersDto as SocialProvidersDto, __webpack_exports__SwitchCompanyDto as SwitchCompanyDto, __webpack_exports__TOKEN_REVOKED_PREFIX as TOKEN_REVOKED_PREFIX, __webpack_exports__TokenType as TokenType, __webpack_exports__USER_ENRICHER as USER_ENRICHER, __webpack_exports__USER_MESSAGES as USER_MESSAGES, __webpack_exports__USER_PERMISSION_MESSAGES as USER_PERMISSION_MESSAGES, __webpack_exports__UpdateCompanyBranchDto as UpdateCompanyBranchDto, __webpack_exports__UpdateCompanyDto as UpdateCompanyDto, __webpack_exports__UpdateSocialAuthConfigDto as UpdateSocialAuthConfigDto, __webpack_exports__UpdateUserDto as UpdateUserDto, __webpack_exports__UserBranchPermissionDto as UserBranchPermissionDto, __webpack_exports__UserBranchesResponseDto as UserBranchesResponseDto, __webpack_exports__UserCompaniesResponseDto as UserCompaniesResponseDto, __webpack_exports__UserCompanyPermission as UserCompanyPermission, __webpack_exports__UserCompanyPermissionDto as UserCompanyPermissionDto, __webpack_exports__UserController as UserController, __webpack_exports__UserInfoDto as UserInfoDto, __webpack_exports__UserLookupResponseDto as UserLookupResponseDto, __webpack_exports__UserPermissionController as UserPermissionController, __webpack_exports__UserPermissionService as UserPermissionService, __webpack_exports__UserResponseDto as UserResponseDto, __webpack_exports__UserService as UserService, __webpack_exports__UserToken as UserToken, __webpack_exports__VerifyEmailDto as VerifyEmailDto, __webpack_exports__authSwaggerConfig as authSwaggerConfig, __webpack_exports__generateTokens as generateTokens, __webpack_exports__getAuthEntitiesByConfig as getAuthEntitiesByConfig, __webpack_exports__getSocialProvider as getSocialProvider, __webpack_exports__parseExpiryToMs as parseExpiryToMs, __webpack_exports__toBranchInfo as toBranchInfo, __webpack_exports__toCompanyInfo as toCompanyInfo, __webpack_exports__toUserInfo as toUserInfo };
|
|
1458
|
+
export { __webpack_exports__AUTH_EMAIL_PROVIDER as AUTH_EMAIL_PROVIDER, __webpack_exports__AUTH_EVENT_ACTIONS as AUTH_EVENT_ACTIONS, __webpack_exports__AUTH_EVENT_ENTITIES as AUTH_EVENT_ENTITIES, __webpack_exports__AUTH_EVENT_MODULE as AUTH_EVENT_MODULE, __webpack_exports__AUTH_MESSAGES as AUTH_MESSAGES, __webpack_exports__AUTH_MODULE_OPTIONS as AUTH_MODULE_OPTIONS, __webpack_exports__AppUser as AppUser, __webpack_exports__AssignUserBranchDto as AssignUserBranchDto, __webpack_exports__AssignUserCompanyDto as AssignUserCompanyDto, __webpack_exports__AuthConfigService as AuthConfigService, __webpack_exports__AuthDataSourceProvider as AuthDataSourceProvider, __webpack_exports__AuthEmailService as AuthEmailService, __webpack_exports__AuthModule as AuthModule, __webpack_exports__AuthenticationController as AuthenticationController, __webpack_exports__AuthenticationService as AuthenticationService, __webpack_exports__BCRYPT_SALT_ROUNDS as BCRYPT_SALT_ROUNDS, __webpack_exports__BRANCH_MESSAGES as BRANCH_MESSAGES, __webpack_exports__BranchController as BranchController, __webpack_exports__BranchInfoDto as BranchInfoDto, __webpack_exports__BranchPermittedUserDto as BranchPermittedUserDto, __webpack_exports__BranchPermittedUsersResponseDto as BranchPermittedUsersResponseDto, __webpack_exports__BranchSelectionInfoDto as BranchSelectionInfoDto, __webpack_exports__BranchService as BranchService, __webpack_exports__COMPANY_MESSAGES as COMPANY_MESSAGES, __webpack_exports__ChangePasswordDto as ChangePasswordDto, __webpack_exports__ClearToken as ClearToken, __webpack_exports__Company as Company, __webpack_exports__CompanyBranch as CompanyBranch, __webpack_exports__CompanyBranchResponseDto as CompanyBranchResponseDto, __webpack_exports__CompanyController as CompanyController, __webpack_exports__CompanyInfoDto as CompanyInfoDto, __webpack_exports__CompanyPermittedUserDto as CompanyPermittedUserDto, __webpack_exports__CompanyPermittedUsersResponseDto as CompanyPermittedUsersResponseDto, __webpack_exports__CompanyResponseDto as CompanyResponseDto, __webpack_exports__CompanySelectionController as CompanySelectionController, __webpack_exports__CompanySelectionResponseDto as CompanySelectionResponseDto, __webpack_exports__CompanySelectionSessionService as CompanySelectionSessionService, __webpack_exports__CompanyService as CompanyService, __webpack_exports__CompanyWithBranchesDto as CompanyWithBranchesDto, __webpack_exports__CreateCompanyBranchDto as CreateCompanyBranchDto, __webpack_exports__CreateCompanyDto as CreateCompanyDto, __webpack_exports__CreateSocialAuthConfigDto as CreateSocialAuthConfigDto, __webpack_exports__CreateUserDto as CreateUserDto, __webpack_exports__DEFAULT_COOKIE_NAME as DEFAULT_COOKIE_NAME, __webpack_exports__EMAIL_VERIFICATION_MESSAGES as EMAIL_VERIFICATION_MESSAGES, __webpack_exports__EmailVerificationController as EmailVerificationController, __webpack_exports__ForgotPasswordDto as ForgotPasswordDto, __webpack_exports__GetBranchUsersDto as GetBranchUsersDto, __webpack_exports__GetCompanyUsersDto as GetCompanyUsersDto, __webpack_exports__JwtStrategy as JwtStrategy, __webpack_exports__LoginDto as LoginDto, __webpack_exports__LoginResponseDto as LoginResponseDto, __webpack_exports__LoginResponseRequiresEmailVerificationDto as LoginResponseRequiresEmailVerificationDto, __webpack_exports__MAX_COOKIE_BYTES as MAX_COOKIE_BYTES, __webpack_exports__MeResponseDto as MeResponseDto, __webpack_exports__PendingRegistration as PendingRegistration, __webpack_exports__PermissionItemDto as PermissionItemDto, __webpack_exports__PermissionType as PermissionType, __webpack_exports__RefreshTokenDto as RefreshTokenDto, __webpack_exports__RegistrationDto as RegistrationDto, __webpack_exports__RegistrationResponseDto as RegistrationResponseDto, __webpack_exports__ResendVerificationDto as ResendVerificationDto, __webpack_exports__ResetPasswordDto as ResetPasswordDto, __webpack_exports__SESSION_CACHE_PREFIX as SESSION_CACHE_PREFIX, __webpack_exports__SOCIAL_AUTH_CONFIG_MESSAGES as SOCIAL_AUTH_CONFIG_MESSAGES, __webpack_exports__SOCIAL_AUTH_MESSAGES as SOCIAL_AUTH_MESSAGES, __webpack_exports__SOCIAL_STATE_PREFIX as SOCIAL_STATE_PREFIX, __webpack_exports__SOCIAL_STATE_TTL_MS as SOCIAL_STATE_TTL_MS, __webpack_exports__SelectDto as SelectDto, __webpack_exports__SetToken as SetToken, __webpack_exports__SocialAuthConfig as SocialAuthConfig, __webpack_exports__SocialAuthConfigController as SocialAuthConfigController, __webpack_exports__SocialAuthConfigResponseDto as SocialAuthConfigResponseDto, __webpack_exports__SocialAuthConfigService as SocialAuthConfigService, __webpack_exports__SocialAuthController as SocialAuthController, __webpack_exports__SocialAuthService as SocialAuthService, __webpack_exports__SocialAuthorizeDto as SocialAuthorizeDto, __webpack_exports__SocialAuthorizeResponseDto as SocialAuthorizeResponseDto, __webpack_exports__SocialCallbackDto as SocialCallbackDto, __webpack_exports__SocialProviderInfoDto as SocialProviderInfoDto, __webpack_exports__SocialProviderTypeEnum as SocialProviderTypeEnum, __webpack_exports__SocialProvidersDto as SocialProvidersDto, __webpack_exports__SwitchCompanyDto as SwitchCompanyDto, __webpack_exports__TOKEN_REVOKED_PREFIX as TOKEN_REVOKED_PREFIX, __webpack_exports__TokenType as TokenType, __webpack_exports__USER_ENRICHER as USER_ENRICHER, __webpack_exports__USER_MESSAGES as USER_MESSAGES, __webpack_exports__USER_PERMISSION_MESSAGES as USER_PERMISSION_MESSAGES, __webpack_exports__UpdateCompanyBranchDto as UpdateCompanyBranchDto, __webpack_exports__UpdateCompanyDto as UpdateCompanyDto, __webpack_exports__UpdateSocialAuthConfigDto as UpdateSocialAuthConfigDto, __webpack_exports__UpdateUserDto as UpdateUserDto, __webpack_exports__UserBranchPermissionDto as UserBranchPermissionDto, __webpack_exports__UserBranchesResponseDto as UserBranchesResponseDto, __webpack_exports__UserCompaniesResponseDto as UserCompaniesResponseDto, __webpack_exports__UserCompanyPermission as UserCompanyPermission, __webpack_exports__UserCompanyPermissionDto as UserCompanyPermissionDto, __webpack_exports__UserController as UserController, __webpack_exports__UserInfoDto as UserInfoDto, __webpack_exports__UserLookupResponseDto as UserLookupResponseDto, __webpack_exports__UserPermissionController as UserPermissionController, __webpack_exports__UserPermissionService as UserPermissionService, __webpack_exports__UserResponseDto as UserResponseDto, __webpack_exports__UserService as UserService, __webpack_exports__UserToken as UserToken, __webpack_exports__VerifyEmailDto as VerifyEmailDto, __webpack_exports__authSwaggerConfig as authSwaggerConfig, __webpack_exports__generateAccessToken as generateAccessToken, __webpack_exports__generateTokens as generateTokens, __webpack_exports__getAuthEntitiesByConfig as getAuthEntitiesByConfig, __webpack_exports__getSocialProvider as getSocialProvider, __webpack_exports__parseExpiryToMs as parseExpiryToMs, __webpack_exports__toBranchInfo as toBranchInfo, __webpack_exports__toCompanyInfo as toCompanyInfo, __webpack_exports__toUserInfo as toUserInfo };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JwtService } from '@nestjs/jwt';
|
|
2
2
|
import { type TokenPayload, type TokenPayloadWithCompany } from '../interfaces/authentication.interface.js';
|
|
3
3
|
import { AuthConfigService } from '../services/auth-config.service.js';
|
|
4
|
+
export declare function generateAccessToken(jwtService: JwtService, authConfig: AuthConfigService, payload: TokenPayload | TokenPayloadWithCompany): string;
|
|
4
5
|
export declare function generateTokens(jwtService: JwtService, authConfig: AuthConfigService, payload: TokenPayload | TokenPayloadWithCompany): {
|
|
5
6
|
accessToken: string;
|
|
6
7
|
refreshToken: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flusys/nestjs-auth",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.5",
|
|
4
4
|
"description": "Authentication and authorization infrastructure for NestJS applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./fesm/index.js",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"rxjs": "^7.8.0"
|
|
92
92
|
},
|
|
93
93
|
"dependencies": {
|
|
94
|
-
"@flusys/nestjs-core": "8.1.
|
|
95
|
-
"@flusys/nestjs-shared": "8.1.
|
|
94
|
+
"@flusys/nestjs-core": "8.1.5",
|
|
95
|
+
"@flusys/nestjs-shared": "8.1.5"
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -47,7 +47,6 @@ export declare class AuthenticationService {
|
|
|
47
47
|
private validateAndLoginWithCompany;
|
|
48
48
|
refreshToken(refreshToken: string): Promise<{
|
|
49
49
|
accessToken: string;
|
|
50
|
-
refreshToken: string;
|
|
51
50
|
}>;
|
|
52
51
|
changePassword(userId: string, currentPassword: string, newPassword: string): Promise<void>;
|
|
53
52
|
logout(userId: string): Promise<void>;
|