public final class AuthorizationResult extends Object
Modifier and Type | Method and Description |
---|---|
static AuthorizationResult |
accessDenied(String reason)
Creates a new
AuthorizationResult instance which indicates that access to the request protected
resource is denied, for the given reason. |
static AuthorizationResult |
accessDenied(String reason,
JsonValue detail)
Creates a new
AuthorizationResult instance which indicates that access to the request protected
resource is denied, for the given reason and detail. |
static AuthorizationResult |
accessPermitted()
Creates a new
AuthorizationResult instance which indicates that access to the requested protected
resource is allowed. |
JsonValue |
getDetail()
Gets the detail of why the request is not authorized to access the requested resource.
|
String |
getReason()
Gets the reason why the request is not authorized to access the requested resource.
|
boolean |
isAuthorized()
Whether the request is authorized to access the requested resource.
|
public static AuthorizationResult accessPermitted()
AuthorizationResult
instance which indicates that access to the requested protected
resource is allowed.AuthorizationResult
instance.public static AuthorizationResult accessDenied(String reason)
AuthorizationResult
instance which indicates that access to the request protected
resource is denied, for the given reason.reason
- The reason why authorization has failed.AuthorizationResult
instance.public static AuthorizationResult accessDenied(String reason, JsonValue detail)
AuthorizationResult
instance which indicates that access to the request protected
resource is denied, for the given reason and detail.reason
- The reason why authorization failed.detail
- A JsonValue
containing additional detail on why authorization failed.AuthorizationResult
instance.public boolean isAuthorized()
true
if the request is authorized.public String getReason()
null
if the request is authorized.public JsonValue getDetail()
JsonValue
containing additional detail on why authorization failed. Maybe null
when the
request is unauthorized or null
if the request is authorized.Copyright © 2025 Open Identity Platform Community. All rights reserved.