You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The decision about using MicroProfile JWT(MP-JWT) as a token format depends on the agreement between both identity
20
+
The maximum utility of the MicroProfile JWT(MP-JWT) as a token format depends on the agreement between both identity
21
21
providers and service providers. This means identity providers - responsible for issuing tokens - should be able to
22
-
issue tokens using the JWT format in a way that service providers can understand in order to introspect the token and
22
+
issue tokens using the MP-JWT format in a way that service providers can understand in order to introspect the token and
23
23
gather information about a subject. To that end, the requirements for the MicroProfile JWT are:
24
24
25
-
1. An authentication token.
26
-
2. An authorization token that contains Java EE application level roles indirectly granted via groups.
25
+
1. Be usable as an authentication token.
26
+
2. Be usable as an authorization token that contains Java EE application level roles indirectly granted via a groups claim.
27
27
3. Can be mapped to IdentityStore in JSR375.
28
28
4. Can support additional standard claims described in https://www.iana.org/assignments/jwt/jwt.xhtml as
29
29
well as non-standard claims.
30
30
31
31
To meet those requirements, we introduce 2 new claims to the MP-JWT:
32
32
33
-
* "upn": A human readable claim that uniquely identifies the subject or user principal of token, across
33
+
* "upn": A human readable claim that uniquely identifies the subject or user principal of the token, across
34
34
the MicroProfile services the token will be accessed with.
35
-
* "groups": The token subject's group membership that will be mapped to Java EE application
36
-
level roles.
35
+
* "groups": The token subject's group memberships that will be mapped to Java EE style application
36
+
level roles in the MicroProfile service container.
37
37
38
-
### Required Claims
38
+
###Minimum MMP-JWT Required Claims
39
39
The required minimum set of MP-JWT claims is then:
40
40
41
41
typ:: This JOSE header parameter identifies the token as an RFC7519 and must be "JWT" https://tools.ietf.org/html/rfc7519#section-5.1[RFC7519, Section 5.1]
@@ -373,7 +373,7 @@ integration is with the JAX-RS container, and injection of the MP-JWT types.
373
373
374
374
#### Injection of `JsonWebToken`
375
375
An MP-JWT implementation must support the injection of the currently authenticated
376
-
caller as a JsonWebToken with @RequestScoped:
376
+
caller as a JsonWebToken with @RequestScoped scope:
377
377
378
378
```java
379
379
@Path("/endp")
@@ -388,12 +388,65 @@ public class RolesEndpoint {
388
388
#### Injection of `ClaimValue`
389
389
390
390
This specification requires support for injection of claims from the current
391
-
`JsonWebToken` using the `org.eclipse.microprofile.jwt.@Claim` qualifier and
392
-
`org.eclipse.microprofile.jwt.ClaimValue` interface with with @RequestScoped scoping.
393
-
The following example code fragment illustrates various examples of injecting
394
-
different types of claims using a range of generic forms of the `ClaimValue`:
391
+
`JsonWebToken` using the `org.eclipse.microprofile.jwt.Claim` qualifier:
392
+
393
+
[source,java]
394
+
----
395
+
/**
396
+
* Annotation used to signify an injection point for a {@link ClaimValue} from
0 commit comments