Record Class NavigationAccessDecision.AccessDenied
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.authorization.navigation.NavigationAccessDecision.AccessDenied
- Record Components:
alternativeRoute- the route to redirect toasForward- if true, use forward instead of reroute
- All Implemented Interfaces:
NavigationAccessDecision
- Enclosing interface:
NavigationAccessDecision
public static record NavigationAccessDecision.AccessDenied(String alternativeRoute, boolean asForward)
extends Record
implements NavigationAccessDecision
The subject exists but lacks the required roles or permissions.
Navigation should be redirected to the given alternative route.
-
Nested Class Summary
Nested classes/interfaces inherited from interface NavigationAccessDecision
NavigationAccessDecision.AccessDenied, NavigationAccessDecision.Allowed, NavigationAccessDecision.AlreadyLoggedIn, NavigationAccessDecision.LoginRequiredModifier and TypeInterfaceDescriptionstatic final recordThe subject exists but lacks the required roles or permissions.static final recordNavigation is allowed.static final recordThe user is already logged in but is navigating to the login page.static final recordThe route is restricted and no subject is in the session. -
Constructor Summary
ConstructorsConstructorDescriptionAccessDenied(String alternativeRoute, boolean asForward) Creates an instance of aAccessDeniedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealternativeRouterecord component.booleanReturns the value of theasForwardrecord 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.
-
Constructor Details
-
AccessDenied
Creates an instance of aAccessDeniedrecord class.- Parameters:
alternativeRoute- the value for thealternativeRouterecord componentasForward- the value for theasForwardrecord component
-
-
Method Details
-
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. -
alternativeRoute
Returns the value of thealternativeRouterecord component.- Returns:
- the value of the
alternativeRouterecord component
-
asForward
-