@dsivd/prestations-ng 18.3.2-beta.1 → 18.3.2-beta.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.
@@ -65,10 +65,13 @@ spring.security.oauth2.client.provider.acv.issuer-uri=http://localhost:8080/acv
65
65
  # With OIDC we have to expose actuators without any security to be called by spring boot admin
66
66
  # so the are exposed on another port
67
67
  management.server.port=${port.divers:8086}
68
- management.endpoint.health.probes.enabled=true
69
68
  # expose liveness/readiness probes on the same port as the application (/livez / readyz)
70
69
  management.endpoint.health.probes.add-additional-paths=true
71
- management.server.tomcat.accesslog.prefix=
70
+ # send actuator access log to /dev/stdout
71
+ management.server.tomcat.accesslog.enabled=true
72
+ management.server.tomcat.accesslog.directory=/dev
73
+ management.server.tomcat.accesslog.prefix=stdout
74
+ management.server.tomcat.accesslog.suffix=
72
75
  ```
73
76
 
74
77
  ### TESTING
@@ -97,25 +100,12 @@ To be able to use @SpringBootTest, you have to :
97
100
  }
98
101
  ```
99
102
 
100
- with :
103
+ with methods from `ch.vd.cyber.backofficebe.utils.MVCTestUtils`:
101
104
 
102
- ```java
103
- static MockHttpServletRequestBuilder enrichWithOidcTokenAsUser(MockHttpServletRequestBuilder builder) {
104
- return builder.with(oidcLogin()
105
- .authorities(
106
- new SimpleGrantedAuthority("ROLE_USER")
107
- )
108
- .idToken(token -> token
109
- .claim("azp", "app")
110
- .claim("preferred_username", "sar8h6")
111
- .claim("email", "bruce.wayne@gotham.com")
112
- .claim("given_name", "Bruce")
113
- .claim("family_name", "Wayne")
114
- .claim("auth_time", Instant.now())
115
- )
116
- );
117
- }
118
- ```
105
+ - `enrichWithOidcTokenAsUser` : simulates that a request is done by an IAM user, with a valid OIDC token and the role "user"
106
+ - `enrichWithOidcTokenAsRole` : same as previous, but you can set another role than "user"
107
+ - `enrichWithAuthHeadersForEsgateAsUser` : simulates that a request is done by a techincal user through esgate and the role "user"
108
+ - `enrichWithAuthHeadersForEsgate` : same as previous, but you can set another role than "user"
119
109
 
120
110
  ## RUNNING YOUR APP
121
111
 
package/package.json CHANGED
@@ -40,7 +40,7 @@
40
40
  "ng-update": {
41
41
  "migrations": "./schematics/migration-collection.json"
42
42
  },
43
- "version": "18.3.2-beta.1",
43
+ "version": "18.3.2-beta.2",
44
44
  "module": "fesm2022/dsivd-prestations-ng.mjs",
45
45
  "typings": "index.d.ts",
46
46
  "exports": {