Record Class AuthorizationEngine.Decision
java.lang.Object
java.lang.Record
zeroecho.pki.server.AuthorizationEngine.Decision
- Record Components:
code- decision codeusedBreakGlass- whether the allowing grant came from break-glass authority
- Enclosing class:
AuthorizationEngine
public static record AuthorizationEngine.Decision(AuthorizationEngine.Code code, boolean usedBreakGlass)
extends Record
Finite safe authorization result.
-
Constructor Summary
ConstructorsConstructorDescriptionDecision(AuthorizationEngine.Code code, boolean usedBreakGlass) Validates result invariants. -
Method Summary
Modifier and TypeMethodDescriptionbooleanallowed()Indicates whether execution is authorized.code()Returns the value of thecoderecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theusedBreakGlassrecord component.
-
Constructor Details
-
Decision
Validates result invariants.
-
-
Method Details
-
allowed
public boolean allowed()Indicates whether execution is authorized.- Returns:
trueonly forAuthorizationEngine.Code.ALLOWED
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
code
-
usedBreakGlass
public boolean usedBreakGlass()Returns the value of theusedBreakGlassrecord component.- Returns:
- the value of the
usedBreakGlassrecord component
-