Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public final class BearerTokenAccessDeniedHandler
- Object
- BearerTokenAccessDeniedHandler
ImplementsAccessDeniedHandler
Answers a request whose token is good and does not grant what the request needs, as RFC 6750 3.1 says to:
403 WWW-Authenticate: Bearer error="insufficient_scope",
error_description="The request requires higher privileges than provided by the
access token.", error_uri="https://tools.ietf.org/html/rfc6750#section-3.1",
scope="orders:write"The scope is there when the rule that refused the request asks for one.
Constructors
public BearerTokenAccessDeniedHandler() |
Methods
public void setRealmName(String realmName) | A realm to name in the challenge; none unless set. |
public HttpServer.Response handle(HttpServer.Request request, AccessDeniedException accessDeniedException) |
Inherited methods
Constructor details
BearerTokenAccessDeniedHandler
public BearerTokenAccessDeniedHandler()Method details
setRealmName
public void setRealmName(String realmName)A realm to name in the challenge; none unless set.
handle
public HttpServer.Response handle(HttpServer.Request request, AccessDeniedException accessDeniedException)