Class MetadataPolicy
java.lang.Object
net.shibboleth.oidc.metadata.policy.MetadataPolicy
- Direct Known Subclasses:
UnregisteredClientPolicy
The metadata policy for a single claim. It exploits the operators defined in the 5.1 of OIDC federation spec
(draft 17 for time being): https://openid.net/specs/openid-connect-federation-1_0.html#rfc.section.5.1
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ObjectThe value(s) to be added for the claim.The map of any other operators not directly mapped.private ObjectThe default value for the claim to be used in case none is specified.private BooleanThe flag indicating that the claim must have a value.private ObjectThe (forced) value for the claim.The list of values from which the claim must be one of.private StringThe regular expression that the claim value must meet.The list of value(s) from which the claim must be subset of.The list of value(s) from which the claim must be superset of. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAdd()Get the value(s) to be added for the claim.Get the map of custom operators.Get the default value for the claim to be used in case none is specified.Get the flag indicating that the claim must have a value.Get the list of values from which the claim must be one of.Get the regular expression that the claim value must meet.Get the list of value(s) from which the claim must be subset of.Get the list of value(s) from which the claim must be superset of.getValue()Get the (forced) value for the claim.booleanIs the flag indicating that the claim must have a value enabled.voidSet the value(s) to be added for the claim.voidsetCustomOperator(String name, Object value) Add a custom operator to the map of custom operators.voidsetDefaultValue(Object value) Set the default value for the claim to be used in case none is specified.voidsetEssential(Boolean isEssential) Set the flag indicating that the claim must have a value.voidsetOneOfValues(List<Object> values) Set the list of values from which the claim must be one of.voidSet the regular expression that the claim value must meet.voidsetSubsetOfValues(List<Object> values) Set the list of value(s) from which the claim must be subset of.voidsetSupersetOfValues(List<Object> values) Set the list of value(s) from which the claim must be superset of.voidSet the (forced) value for the claim.toString()
-
Field Details
-
forcedValue
The (forced) value for the claim. -
add
The value(s) to be added for the claim. -
defaultValue
The default value for the claim to be used in case none is specified. -
oneOfValues
The list of values from which the claim must be one of. -
subsetOfValues
The list of value(s) from which the claim must be subset of. -
supersetOfValues
The list of value(s) from which the claim must be superset of. -
essential
The flag indicating that the claim must have a value. -
regexp
The regular expression that the claim value must meet. -
customOperators
The map of any other operators not directly mapped.
-
-
Constructor Details
-
MetadataPolicy
public MetadataPolicy()
-
-
Method Details
-
getValue
Get the (forced) value for the claim.- Returns:
- The (forced) value for the claim.
-
setValue
Set the (forced) value for the claim.- Parameters:
value- What to set.
-
getAdd
Get the value(s) to be added for the claim.- Returns:
- The value(s) to be added for the claim.
-
setAdd
Set the value(s) to be added for the claim.- Parameters:
value- What to set.
-
getDefaultValue
Get the default value for the claim to be used in case none is specified.- Returns:
- The default value for the claim to be used in case none is specified.
-
setDefaultValue
Set the default value for the claim to be used in case none is specified.- Parameters:
value- What to set.
-
getOneOfValues
Get the list of values from which the claim must be one of.- Returns:
- The list of values from which the claim must be one of.
-
setOneOfValues
Set the list of values from which the claim must be one of.- Parameters:
values- What to set.
-
getSubsetOfValues
Get the list of value(s) from which the claim must be subset of.- Returns:
- The list of value(s) from which the claim must be subset of.
-
setSubsetOfValues
Set the list of value(s) from which the claim must be subset of.- Parameters:
values- What to set.
-
getSupersetOfValues
Get the list of value(s) from which the claim must be superset of.- Returns:
- The list of value(s) from which the claim must be superset of.
-
setSupersetOfValues
Set the list of value(s) from which the claim must be superset of.- Parameters:
values- What to set.
-
getEssential
Get the flag indicating that the claim must have a value.- Returns:
- The flag indicating that the claim must have a value.
-
isEssential
public boolean isEssential()Is the flag indicating that the claim must have a value enabled.- Returns:
- true if enabled, false otherwise.
-
setEssential
Set the flag indicating that the claim must have a value.- Parameters:
isEssential- What to set.
-
getRegexp
Get the regular expression that the claim value must meet.- Returns:
- The regular expression that the claim value must meet.
-
setRegexp
Set the regular expression that the claim value must meet.- Parameters:
value- What to set.
-
getCustomOperators
Get the map of custom operators.- Returns:
- The map of any other operators not directly mapped.
- Since:
- 3.1.0
-
setCustomOperator
Add a custom operator to the map of custom operators.- Parameters:
name- The name of the custom operator.value- The value of the custom operator.- Since:
- 3.1.0
-
toString
-