@netgrif/components-core 7.0.0-beta.2 → 7.0.0-rc.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/esm2022/lib/authentication/authentication.factory.mjs +5 -1
- package/esm2022/lib/authentication/models/credentials.mjs +1 -1
- package/esm2022/lib/authentication/models/user.transformer.mjs +2 -2
- package/esm2022/lib/authentication/services/methods/basic-authentication/basic-with-realm-authentication.service.mjs +43 -0
- package/esm2022/lib/authentication/services/public-api.mjs +2 -1
- package/esm2022/lib/navigation/breadcrumbs/abstract-breadcrumbs.component.mjs +4 -4
- package/esm2022/lib/navigation/model/uri-resource.mjs +1 -1
- package/esm2022/lib/navigation/navigation-double-drawer/abstract-navigation-double-drawer.mjs +11 -11
- package/esm2022/lib/navigation/service/uri.service.mjs +10 -10
- package/esm2022/lib/resources/abstract-endpoint/abstract-resource.service.mjs +28 -1
- package/esm2022/lib/resources/engine-endpoint/petri-net-resource.service.mjs +5 -3
- package/esm2022/lib/resources/engine-endpoint/public/public-petri-net-resource.service.mjs +3 -2
- package/esm2022/lib/resources/engine-endpoint/user-resource.service.mjs +36 -35
- package/esm2022/lib/side-menu/content-components/import-net/abstract-import-net.component.mjs +2 -2
- package/esm2022/lib/task-content/services/field-converter.service.mjs +4 -4
- package/esm2022/lib/user/models/iuser.mjs +1 -1
- package/esm2022/lib/user/models/user.mjs +6 -2
- package/esm2022/lib/user/services/user-list.service.mjs +2 -2
- package/esm2022/lib/user/services/user.service.mjs +2 -2
- package/esm2022/lib/utility/tests/mocks/mock-authentication-method-service.mjs +2 -2
- package/esm2022/lib/utility/tests/mocks/mock-authentication.service.mjs +2 -2
- package/esm2022/lib/utility/tests/mocks/mock-user-resource.service.mjs +2 -2
- package/fesm2022/netgrif-components-core.mjs +150 -75
- package/fesm2022/netgrif-components-core.mjs.map +1 -1
- package/lib/authentication/authentication.factory.d.ts +2 -1
- package/lib/authentication/models/credentials.d.ts +1 -0
- package/lib/authentication/services/methods/basic-authentication/basic-with-realm-authentication.service.d.ts +16 -0
- package/lib/authentication/services/public-api.d.ts +1 -0
- package/lib/navigation/model/uri-resource.d.ts +2 -1
- package/lib/resources/abstract-endpoint/abstract-resource.service.d.ts +6 -0
- package/lib/resources/engine-endpoint/user-resource.service.d.ts +17 -17
- package/lib/user/models/iuser.d.ts +18 -0
- package/lib/user/models/user.d.ts +3 -1
- package/package.json +1 -1
|
@@ -2,4 +2,5 @@ import { ConfigurationService } from '../configuration/configuration.service';
|
|
|
2
2
|
import { NullAuthenticationService } from './services/methods/null-authentication/null-authentication.service';
|
|
3
3
|
import { BasicAuthenticationService } from './services/methods/basic-authentication/basic-authentication.service';
|
|
4
4
|
import { HttpClient } from '@angular/common/http';
|
|
5
|
-
|
|
5
|
+
import { BasicWithRealmAuthenticationService } from "./services/methods/basic-authentication/basic-with-realm-authentication.service";
|
|
6
|
+
export declare function authenticationServiceFactory(config: ConfigurationService, http: HttpClient): NullAuthenticationService | BasicAuthenticationService | BasicWithRealmAuthenticationService;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ConfigurationService } from "../../../../configuration/configuration.service";
|
|
2
|
+
import { AuthenticationMethodService } from "../../authentication-method.service";
|
|
3
|
+
import { HttpClient } from "@angular/common/http";
|
|
4
|
+
import { Observable } from "rxjs";
|
|
5
|
+
import { UserResource } from "../../../../resources/interface/user-resource";
|
|
6
|
+
import { Credentials } from "../../../models/credentials";
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class BasicWithRealmAuthenticationService extends AuthenticationMethodService {
|
|
9
|
+
private _http;
|
|
10
|
+
private _config;
|
|
11
|
+
constructor(_http: HttpClient, _config: ConfigurationService);
|
|
12
|
+
login(credentials?: Credentials): Observable<UserResource>;
|
|
13
|
+
logout(): Observable<object>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BasicWithRealmAuthenticationService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BasicWithRealmAuthenticationService>;
|
|
16
|
+
}
|
|
@@ -2,4 +2,5 @@ export * from './authentication/authentication.service';
|
|
|
2
2
|
export * from './guard/authentication-guard.service';
|
|
3
3
|
export * from './authentication-method.service';
|
|
4
4
|
export * from './methods/basic-authentication/basic-authentication.service';
|
|
5
|
+
export * from './methods/basic-authentication/basic-with-realm-authentication.service';
|
|
5
6
|
export * from './methods/null-authentication/null-authentication.service';
|
|
@@ -35,4 +35,10 @@ export declare abstract class AbstractResourceService {
|
|
|
35
35
|
* @param propertiesParams - plural form of the resource name, that is used to extract the data. Eg. "cases".
|
|
36
36
|
*/
|
|
37
37
|
protected changeType<T>(r: any, propertiesParams: string): T;
|
|
38
|
+
/**
|
|
39
|
+
* Converts a Spring-style paginated response into the application's Page<T> format.
|
|
40
|
+
* @param response The raw response from backend (Spring `PageImpl` structure).
|
|
41
|
+
* @returns Converted Page<T> object.
|
|
42
|
+
*/
|
|
43
|
+
protected mapToPage<T>(response: any): Page<T>;
|
|
38
44
|
}
|
|
@@ -16,23 +16,23 @@ export declare class UserResourceService extends AbstractResourceService {
|
|
|
16
16
|
*
|
|
17
17
|
* **Request Type:** POST
|
|
18
18
|
*
|
|
19
|
-
* **Request URL:** {{baseUrl}}/api/
|
|
19
|
+
* **Request URL:** {{baseUrl}}/api/users/{id}/authority/assign
|
|
20
20
|
*/
|
|
21
|
-
assignAuthority(userId: string, body: object, params?: Params): Observable<MessageResource>;
|
|
21
|
+
assignAuthority(userId: string, body: object, realmId?: string, params?: Params): Observable<MessageResource>;
|
|
22
22
|
/**
|
|
23
23
|
* Assign role to the user
|
|
24
24
|
*
|
|
25
25
|
* **Request Type:** POST
|
|
26
26
|
*
|
|
27
|
-
* **Request URL:** {{baseUrl}}/api/
|
|
27
|
+
* **Request URL:** {{baseUrl}}/api/users/{id}/role/assign
|
|
28
28
|
*/
|
|
29
|
-
assignRoles(userId: string, body: object, params?: Params): Observable<MessageResource>;
|
|
29
|
+
assignRoles(userId: string, realmId: string, body: object, params?: Params): Observable<MessageResource>;
|
|
30
30
|
/**
|
|
31
31
|
* Get all authorities of the system
|
|
32
32
|
*
|
|
33
33
|
* **Request Type:** GET
|
|
34
34
|
*
|
|
35
|
-
* **Request URL:** {{baseUrl}}/api/
|
|
35
|
+
* **Request URL:** {{baseUrl}}/api/users/authority
|
|
36
36
|
*/
|
|
37
37
|
getAllAuthorities(): Observable<Array<Authority>>;
|
|
38
38
|
/**
|
|
@@ -48,7 +48,7 @@ export declare class UserResourceService extends AbstractResourceService {
|
|
|
48
48
|
*
|
|
49
49
|
* **Request Type:** POST
|
|
50
50
|
*
|
|
51
|
-
* **Request URL:** {{baseUrl}}/api/
|
|
51
|
+
* **Request URL:** {{baseUrl}}/api/users/role
|
|
52
52
|
*/
|
|
53
53
|
getAllWithRole(body: object, params?: Params): Observable<Array<UserResource>>;
|
|
54
54
|
/**
|
|
@@ -56,7 +56,7 @@ export declare class UserResourceService extends AbstractResourceService {
|
|
|
56
56
|
*
|
|
57
57
|
* **Request Type:** GET
|
|
58
58
|
*
|
|
59
|
-
* **Request URL:** {{baseUrl}}/api/
|
|
59
|
+
* **Request URL:** {{baseUrl}}/api/users/me
|
|
60
60
|
*/
|
|
61
61
|
getLoggedUser(params?: Params): Observable<UserResource>;
|
|
62
62
|
/**
|
|
@@ -64,7 +64,7 @@ export declare class UserResourceService extends AbstractResourceService {
|
|
|
64
64
|
*
|
|
65
65
|
* **Request Type:** GET
|
|
66
66
|
*
|
|
67
|
-
* **Request URL:** {{baseUrl}}/api/
|
|
67
|
+
* **Request URL:** {{baseUrl}}/api/users/me
|
|
68
68
|
*/
|
|
69
69
|
getPublicLoggedUser(params?: Params): Observable<UserResource>;
|
|
70
70
|
/**
|
|
@@ -72,15 +72,15 @@ export declare class UserResourceService extends AbstractResourceService {
|
|
|
72
72
|
*
|
|
73
73
|
* **Request Type:** GET
|
|
74
74
|
*
|
|
75
|
-
* **Request URL:** {{baseUrl}}/api/
|
|
75
|
+
* **Request URL:** {{baseUrl}}/api/users/{id}
|
|
76
76
|
*/
|
|
77
|
-
getUser(userId: string, params?: Params): Observable<UserResource>;
|
|
77
|
+
getUser(userId: string, realmId?: string, params?: Params): Observable<UserResource>;
|
|
78
78
|
/**
|
|
79
79
|
* Get user's preferences
|
|
80
80
|
*
|
|
81
81
|
* **Request Type:** GET
|
|
82
82
|
*
|
|
83
|
-
* **Request URL:** {{baseUrl}}/api/
|
|
83
|
+
* **Request URL:** {{baseUrl}}/api/users/preferences
|
|
84
84
|
*/
|
|
85
85
|
getPreferences(params?: Params): Observable<Preferences>;
|
|
86
86
|
/**
|
|
@@ -88,7 +88,7 @@ export declare class UserResourceService extends AbstractResourceService {
|
|
|
88
88
|
*
|
|
89
89
|
* **Request Type:** POST
|
|
90
90
|
*
|
|
91
|
-
* **Request URL:** {{baseUrl}}/api/
|
|
91
|
+
* **Request URL:** {{baseUrl}}/api/users/preferences
|
|
92
92
|
*/
|
|
93
93
|
setPreferences(body: object, params?: Params): Observable<MessageResource>;
|
|
94
94
|
/**
|
|
@@ -96,7 +96,7 @@ export declare class UserResourceService extends AbstractResourceService {
|
|
|
96
96
|
*
|
|
97
97
|
* **Request Type:** GET
|
|
98
98
|
*
|
|
99
|
-
* **Request URL:** {{baseUrl}}/api/
|
|
99
|
+
* **Request URL:** {{baseUrl}}/api/users/preferences
|
|
100
100
|
*/
|
|
101
101
|
getPublicPreferences(params?: Params): Observable<Preferences>;
|
|
102
102
|
/**
|
|
@@ -104,7 +104,7 @@ export declare class UserResourceService extends AbstractResourceService {
|
|
|
104
104
|
*
|
|
105
105
|
* **Request Type:** POST
|
|
106
106
|
*
|
|
107
|
-
* **Request URL:** {{baseUrl}}/api/
|
|
107
|
+
* **Request URL:** {{baseUrl}}/api/users/preferences
|
|
108
108
|
*/
|
|
109
109
|
setPublicPreferences(body: object, params?: Params): Observable<MessageResource>;
|
|
110
110
|
/**
|
|
@@ -112,7 +112,7 @@ export declare class UserResourceService extends AbstractResourceService {
|
|
|
112
112
|
*
|
|
113
113
|
* **Request Type:** POST
|
|
114
114
|
*
|
|
115
|
-
* **Request URL:** {{baseUrl}}/api/
|
|
115
|
+
* **Request URL:** {{baseUrl}}/api/users/search
|
|
116
116
|
*/
|
|
117
117
|
search(body: object, params?: Params): Observable<Page<UserResource>>;
|
|
118
118
|
/**
|
|
@@ -120,9 +120,9 @@ export declare class UserResourceService extends AbstractResourceService {
|
|
|
120
120
|
*
|
|
121
121
|
* **Request Type:** POST
|
|
122
122
|
*
|
|
123
|
-
* **Request URL:** {{baseUrl}}/api/
|
|
123
|
+
* **Request URL:** {{baseUrl}}/api/users/{id}
|
|
124
124
|
*/
|
|
125
|
-
updateUser(userId: string, body: object, params?: Params): Observable<UserResource>;
|
|
125
|
+
updateUser(userId: string, body: object, realmId?: string, params?: Params): Observable<UserResource>;
|
|
126
126
|
/**
|
|
127
127
|
* get all groups
|
|
128
128
|
*
|
|
@@ -4,16 +4,34 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export interface IUser {
|
|
6
6
|
id: string;
|
|
7
|
+
/**
|
|
8
|
+
* **Example:** johndoe
|
|
9
|
+
*/
|
|
10
|
+
username: string;
|
|
7
11
|
/**
|
|
8
12
|
* **Example:** example@netgrif.com
|
|
9
13
|
*/
|
|
10
14
|
email: string;
|
|
15
|
+
/**
|
|
16
|
+
* **Example:** 68187906482dcc38f6641bff
|
|
17
|
+
*/
|
|
18
|
+
realmId: string;
|
|
11
19
|
/**
|
|
12
20
|
* **Example:** Example
|
|
21
|
+
* @deprecated
|
|
13
22
|
*/
|
|
14
23
|
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* **Example:** Example
|
|
26
|
+
*/
|
|
27
|
+
firstName: string;
|
|
15
28
|
/**
|
|
16
29
|
* **Example:** Netgrif
|
|
30
|
+
@deprecated
|
|
17
31
|
*/
|
|
18
32
|
surname: string;
|
|
33
|
+
/**
|
|
34
|
+
* **Example:** Netgrif
|
|
35
|
+
*/
|
|
36
|
+
lastName: string;
|
|
19
37
|
}
|
|
@@ -5,7 +5,9 @@ import { IUser } from './iuser';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare class User implements IUser {
|
|
7
7
|
id: string;
|
|
8
|
+
username: string;
|
|
8
9
|
email: string;
|
|
10
|
+
realmId: string;
|
|
9
11
|
firstName: string;
|
|
10
12
|
lastName: string;
|
|
11
13
|
authorities: Array<string>;
|
|
@@ -13,7 +15,7 @@ export declare class User implements IUser {
|
|
|
13
15
|
groups?: Array<string>;
|
|
14
16
|
nextGroups?: Array<string>;
|
|
15
17
|
impersonated?: User;
|
|
16
|
-
constructor(id: string, email: string, firstName: string, lastName: string, authorities: Array<string>, roles: Array<ProcessRole>, groups?: Array<string>, nextGroups?: Array<string>, impersonated?: User);
|
|
18
|
+
constructor(id: string, username: string, email: string, realmId: string, firstName: string, lastName: string, authorities: Array<string>, roles: Array<ProcessRole>, groups?: Array<string>, nextGroups?: Array<string>, impersonated?: User);
|
|
17
19
|
get fullName(): string;
|
|
18
20
|
/**
|
|
19
21
|
* Synonym for `firstName`.
|
package/package.json
CHANGED