Skip to content

Commit 18a9b7d

Browse files
authored
properties intead of yaml (#1430)
1 parent 60a0faa commit 18a9b7d

File tree

4 files changed

+24
-42
lines changed

4 files changed

+24
-42
lines changed

guides/micronaut-security-jwt/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"apps": [
99
{
1010
"name": "default",
11-
"features": ["yaml", "security-jwt", "data-jdbc", "reactor", "graalvm", "validation"]
11+
"features": ["security-jwt", "data-jdbc", "reactor", "graalvm", "validation"]
1212
}
1313
]
1414
}

guides/micronaut-security-jwt/micronaut-security-jwt.adoc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ common:create-app-features.adoc[]
1818

1919
=== Configuration
2020

21-
Note the following configuration in the generated `application.yml`:
21+
Note the following configuration in the generated `application.properties`:
2222

23-
common:yaml-dependency.adoc[]
24-
25-
resource:application.yml[tag=security]
23+
resource:application.properties[tag=security]
2624

2725
<1> Set `authentication` to `bearer` to receive a JSON response from the login endpoint.
2826
<2> Change this to your own secret and keep it safe (do not store this in your VCS).
@@ -83,7 +81,7 @@ Access tokens expire. You can control the expiration with `micronaut.security.to
8381

8482
First, add the following configuration:
8583

86-
resource:application.yml[tag=refresh]
84+
resource:application.properties[tag=refresh]
8785

8886
<1> To generate a refresh token your application must have beans of type:
8987
https://micronaut-projects.github.io/micronaut-security/latest/api/io/micronaut/security/token/generator/RefreshTokenGenerator.html[RefreshTokenGenerator],
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
micronaut.application.name=micronautguide
2+
#tag::security[]
3+
# <1>
4+
micronaut.security.authentication=bearer
5+
# <2>
6+
micronaut.security.token.jwt.signatures.secret.generator.secret="${JWT_GENERATOR_SIGNATURE_SECRET:pleaseChangeThisSecretForANewOne}"'
7+
#end::security[]
8+
#tag::refresh[]
9+
# <1>
10+
micronaut.security.token.jwt.generator.refresh-token.secret="${JWT_GENERATOR_SIGNATURE_SECRET:pleaseChangeThisSecretForANewOne}"'
11+
#end::refresh[]
12+
---
13+
#tag::datasources[]
14+
datasources.default.password=
15+
datasources.default.url=jdbc:h2:mem:default;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
16+
datasources.default.username=sa
17+
datasources.default.driver-class-name=org.h2.Driver
18+
datasources.default.schema-generate=CREATE_DROP
19+
datasources.default.dialect=H2
20+
#end::datasource[]

guides/micronaut-security-jwt/src/main/resources/application.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)