Skip to content

Commit 36fee2e

Browse files
Fix section levels in JWT documentation
1 parent 84647f4 commit 36fee2e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

vertx-auth-jwt/src/main/asciidoc/index.adoc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ A typical flow of JWT usage is that in your application you have one end point t
5656
{@link examples.AuthJWTExamples#example7}
5757
----
5858

59-
=== Loading Keys
59+
== Loading Keys
6060

6161
Loading keys can be performed in 3 different ways:
6262

6363
* Using secrets (symmetric keys)
6464
* Using OpenSSL `pem` formatted files (pub/sec keys)
6565
* Using Java Keystore files (both symmetric and pub/sec keys)
6666

67-
==== Using Symmetric Keys
67+
=== Using Symmetric Keys
6868

6969
The default signature method for JWT's is known as `HS256`. `HS` stands in this case for `HMAC Signature using SHA256`.
7070

@@ -78,7 +78,7 @@ All you need is a secret that is shared between you and the 3rd party, for examp
7878

7979
In this case the secret is configured as a public key, as it is a token that is known to both parties and you configure your PubSec key as being symmetric.
8080

81-
==== Using RSA keys
81+
=== Using RSA keys
8282

8383
This section is by no means a manual on OpenSSL and a read on OpenSSL command line usage is advised.
8484
We will cover how to generate the most common keys and how to use them with JWT auth.
@@ -156,7 +156,7 @@ Now you can use this to issue or validate tokens:
156156
{@link examples.AuthJWTExamples#example15}
157157
----
158158

159-
==== Using EC keys
159+
=== Using EC keys
160160

161161
Elliptic Curve keys are also supported, however the default JDK has some limitations on the features that can be used.
162162

@@ -215,7 +215,7 @@ So you can do all operations with it:
215215
{@link examples.AuthJWTExamples#example18}
216216
----
217217

218-
==== The JWT keystore file
218+
=== The JWT keystore file
219219

220220
If you prefer to use Java Keystores, then you can do it either.
221221

@@ -246,7 +246,7 @@ The validity of the certificate is tested on load and keys will not be loaded if
246246
All keys algorithms will be checked if can be matched to the given alias.
247247
For example an `RS256` key will not be loaded if issued with a `EC` algorithm, or if issued with `RSA` but signature `SHA1WithRSA` instead of `SHA256WithRSA`.
248248

249-
===== Generate a new Keystore file
249+
==== Generate a new Keystore file
250250

251251
The only required tool to generate a keystore file is `keytool`, you can now specify which algorithms you need by running:
252252

@@ -264,7 +264,7 @@ keytool -genkeypair -keystore keystore.jceks -storetype jceks -storepass secret
264264

265265
For more information on keystores and how to use the `PKCS12` format (Default from Java >=9) please see the documentation of the common module.
266266

267-
=== Read only tokens
267+
== Read only tokens
268268

269269
If you need to consume JWT tokens issues by third parties you probably won't have the private key with you, in that case all you need to have is a public key im PEM format.
270270

@@ -338,7 +338,7 @@ The typical usage is to extract the permissions form the user object using the p
338338
{@link examples.AuthJWTExamples#example13}
339339
----
340340

341-
By default the provider will lookup under the key `permissions` but like the other providers one can extend the concept to authorities to roles by using the `:` as a splitter, so `role:authority` can be used to lookup the token.
341+
By default, the provider will lookup under the key `permissions` but like the other providers one can extend the concept to authorities to roles by using the `:` as a splitter, so `role:authority` can be used to lookup the token.
342342

343343
Since JWT are quite free form and there is no standard on where to lookup for the claims the location can be configured to use something else than `permissions`, for example one can even lookup under a path like this:
344344

@@ -383,5 +383,5 @@ This means that there is no `iat` field in the token.
383383
Token expiration is controlled by the property `expiresInSeconds`, by default there is no expiration.
384384
Other control fields `audience`, `issuer` and `subject` are then picked from the config is available and added to the token metadata.
385385

386-
Finally the token is signed and encoded in the correct format.
386+
Finally, the token is signed and encoded in the correct format.
387387

0 commit comments

Comments
 (0)