Class MetadataIdentityVerifier
- java.lang.Object
-
- com.adaptris.core.security.access.IdentityVerifierImpl
-
- com.adaptris.core.security.access.MetadataIdentityVerifier
-
- All Implemented Interfaces:
ComponentLifecycle
,IdentityVerifier
public class MetadataIdentityVerifier extends IdentityVerifierImpl
Identity verification based on matching metadata keys against other metadata keys.This
IdentityVerifier
iterates over each entry in the identity map fromIdentityBuilder.build(AdaptrisMessage)
and compares the value with the corresponding value from message metadata.The key in
getMetadataMap()
needs to match the key in the identity map. The value refers to the metadata key that will be used to perform the match. In the event that theIdentityBuilder
builds a map containing non-strings; then results are undefined (most likelyvalidate(IdentityBuilder, AdaptrisMessage)
will return false).In the adapter configuration file this class is aliased as simple-metadata-user-identity-verifier which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.security.access.IdentityVerifierImpl
log
-
-
Constructor Summary
Constructors Constructor Description MetadataIdentityVerifier()
MetadataIdentityVerifier(KeyValuePairSet set)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KeyValuePairSet
getMetadataMap()
void
setMetadataMap(KeyValuePairSet m)
Set the map to verify against.boolean
validate(IdentityBuilder builder, AdaptrisMessage msg)
-
Methods inherited from class com.adaptris.core.security.access.IdentityVerifierImpl
close, init, start, stop
-
-
-
-
Constructor Detail
-
MetadataIdentityVerifier
public MetadataIdentityVerifier()
-
MetadataIdentityVerifier
public MetadataIdentityVerifier(KeyValuePairSet set)
-
-
Method Detail
-
validate
public boolean validate(IdentityBuilder builder, AdaptrisMessage msg)
-
getMetadataMap
public KeyValuePairSet getMetadataMap()
-
setMetadataMap
public void setMetadataMap(KeyValuePairSet m)
Set the map to verify against.The key in this instance should match the key returned by
IdentityBuilder.build(AdaptrisMessage)
and the value the corresponding metadata key that you want to match against.- Parameters:
m
- the map;
-
-