Class OneOfOperation
- java.lang.Object
-
- com.nimbusds.openid.connect.sdk.federation.policy.operations.OneOfOperation
-
- All Implemented Interfaces:
PolicyConfiguration,PolicyOperation,StringListConfiguration,StringOperation
public class OneOfOperation extends Object implements StringOperation
One-of (one_of) operation.Example policy:
"request_object_signing_alg" : { "one_of" : [ "ES256", "ES384", "ES512" ] }Input:
"request_object_signing_alg" : "ES384"
Result:
"request_object_signing_alg" : "ES384"
Related specifications:
- OpenID Connect Federation 1.0, section 5.1.2.
-
-
Field Summary
Fields Modifier and Type Field Description protected com.nimbusds.openid.connect.sdk.federation.policy.operations.ConfigurationTypeconfigTypeThe configuration type.static OperationNameNAMEprotected Set<String>setConfigThe set configuration.
-
Constructor Summary
Constructors Constructor Description OneOfOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringapply(String value)Applies a string operation.voidconfigure(List<String> parameter)Configures.OperationNamegetOperationName()Returns the name identifying the policy operation.List<String>getStringListConfiguration()Gets the string list configuration.PolicyOperationmerge(PolicyOperation other)Merges a policy operation.voidparseConfiguration(Object jsonEntity)Parses a federation policy operation configuration from the specified JSON entity.Map.Entry<String,Object>toJSONObjectEntry()Returns a JSON object entry representation of the policy operation.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.nimbusds.openid.connect.sdk.federation.policy.language.PolicyOperation
parseConfiguration
-
-
-
-
Field Detail
-
NAME
public static final OperationName NAME
-
configType
protected com.nimbusds.openid.connect.sdk.federation.policy.operations.ConfigurationType configType
The configuration type.
-
-
Constructor Detail
-
OneOfOperation
public OneOfOperation()
-
-
Method Detail
-
getOperationName
public OperationName getOperationName()
Description copied from interface:PolicyOperationReturns the name identifying the policy operation.- Specified by:
getOperationNamein interfacePolicyOperation- Returns:
- The operation name.
-
toJSONObjectEntry
public Map.Entry<String,Object> toJSONObjectEntry()
Description copied from interface:PolicyOperationReturns a JSON object entry representation of the policy operation.- Specified by:
toJSONObjectEntryin interfacePolicyOperation- Returns:
- The JSON object entry, with a boolean, number, string, array or object value.
-
merge
public PolicyOperation merge(PolicyOperation other) throws PolicyViolationException
Description copied from interface:PolicyOperationMerges a policy operation.- Specified by:
mergein interfacePolicyOperation- Parameters:
other- The policy to merge. Must be of the same type and notnull.- Returns:
- The resulting new policy operation.
- Throws:
PolicyViolationException- On a merge exception.
-
apply
public String apply(String value) throws PolicyViolationException
Description copied from interface:StringOperationApplies a string operation.- Specified by:
applyin interfaceStringOperation- Parameters:
value- The string,nullif not specified.- Returns:
- The resulting string.
- Throws:
PolicyViolationException- On a policy violation.
-
configure
public void configure(List<String> parameter)
Description copied from interface:StringListConfigurationConfigures.- Specified by:
configurein interfaceStringListConfiguration- Parameters:
parameter- The string list configuration parameter. Must not benull.
-
parseConfiguration
public void parseConfiguration(Object jsonEntity) throws ParseException
Description copied from interface:PolicyOperationParses a federation policy operation configuration from the specified JSON entity.- Specified by:
parseConfigurationin interfacePolicyOperation- Parameters:
jsonEntity- The JSON entity, must represent a boolean, number, string, array or object.nullif not specified.- Throws:
ParseException- On a parse exception.
-
getStringListConfiguration
public List<String> getStringListConfiguration()
Description copied from interface:StringListConfigurationGets the string list configuration.- Specified by:
getStringListConfigurationin interfaceStringListConfiguration- Returns:
- The string list configuration parameter.
-
-