Package io.helidon.microprofile.jwt.auth
Class JsonWebTokenImpl
- java.lang.Object
-
- io.helidon.microprofile.jwt.auth.JsonWebTokenImpl
-
- All Implemented Interfaces:
Principal
,AbacSupport
,Principal
,org.eclipse.microprofile.jwt.JsonWebToken
public final class JsonWebTokenImpl extends Object implements org.eclipse.microprofile.jwt.JsonWebToken, Principal
Implementation ofJsonWebToken
with additional support ofAbacSupport
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.helidon.security.util.AbacSupport
AbacSupport.BasicAttributes
-
Nested classes/interfaces inherited from interface io.helidon.security.Principal
Principal.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<String>
abacAttributeNames()
A collection of all property names in this container.Object
abacAttributeRaw(String key)
Return the actual property value or null if not present.<T> T
getClaim(String claimName)
<T> T
getClaim(String claimName, Class<T> clazz)
Produce a claim based on its name and expected class.Set<String>
getClaimNames()
String
getName()
String
id()
Id of this principal.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.helidon.security.util.AbacSupport
abacAttribute
-
-
-
-
Method Detail
-
getName
public String getName()
-
getClaimNames
public Set<String> getClaimNames()
- Specified by:
getClaimNames
in interfaceorg.eclipse.microprofile.jwt.JsonWebToken
-
getClaim
public <T> T getClaim(String claimName)
- Specified by:
getClaim
in interfaceorg.eclipse.microprofile.jwt.JsonWebToken
-
getClaim
public <T> T getClaim(String claimName, Class<T> clazz)
Produce a claim based on its name and expected class.- Type Parameters:
T
- type- Parameters:
claimName
- name of the claimclazz
- expected type- Returns:
- claim value
-
abacAttributeRaw
public Object abacAttributeRaw(String key)
Description copied from interface:AbacSupport
Return the actual property value or null if not present. This is the only method that needs to be implemented.- Specified by:
abacAttributeRaw
in interfaceAbacSupport
- Parameters:
key
- key (name) of the property- Returns:
- value of the property or null
-
abacAttributeNames
public Collection<String> abacAttributeNames()
Description copied from interface:AbacSupport
A collection of all property names in this container.- Specified by:
abacAttributeNames
in interfaceAbacSupport
- Returns:
- collection of keys
-
-