Enum FailureMode
- All Implemented Interfaces:
Comparable<FailureMode>
What a protected host should do when a token cannot be obtained.
This is deliberately a per-host decision. An app typically wants CLOSED on the handful of
endpoints that move money or read personal data, and OPEN everywhere else, so that a shield
service outage degrades one feature rather than bricking the app.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRefuse to send the request, failing it with aShieldExceptioncarrying the reason.Send the request without a token. -
Method Summary
Modifier and TypeMethodDescriptionstatic FailureModeReturns the enum constant of this type with the specified name.static FailureMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
OPEN
Send the request without a token. The customer's backend still decides what to do with an unattested request; this only means the client does not block it locally.
This is the default, and it is the only behaviour available when the app was built without the enterprise engine.
-
CLOSED
Refuse to send the request, failing it with aShieldExceptioncarrying the reason. Use this only where a false negative is more acceptable than an unattested call, and only after readingShieldStatus.isTransient()-- most token failures are network problems, not compromised devices.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-