Package org.wildfly.security.auth.server
Interface EvidenceDecoder
-
- All Known Implementing Classes:
X500SubjectEvidenceDecoder
,X509SubjectAltNameEvidenceDecoder
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface EvidenceDecoder extends Function<Evidence,Principal>
A decoder for extracting a principal from evidence.- Since:
- 1.10.0
- Author:
- Farah Juma
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static EvidenceDecoder
aggregate(EvidenceDecoder... decoders)
Create an aggregated evidence decoder.default Principal
apply(Evidence evidence)
Principal
getPrincipal(Evidence evidence)
Get the principal from the given evidence.
-
-
-
Method Detail
-
getPrincipal
Principal getPrincipal(Evidence evidence)
Get the principal from the given evidence. If this decoder does not understand the given evidence,null
is returned.- Parameters:
evidence
- the evidence to decode- Returns:
- the principal, or
null
if this decoder does not understand the evidence
-
aggregate
static EvidenceDecoder aggregate(EvidenceDecoder... decoders)
Create an aggregated evidence decoder. The aggregated decoder will try each evidence decoder until one returns anon-null
value. If all the evidence decoders returnnull
, thennull
will be returned.- Parameters:
decoders
- the constituent decoders- Returns:
- the aggregated decoder
-
-