Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.

public interface AuthorizationManager<T>

Known subtypesAuthenticatedAuthorizationManager, AuthorityAuthorizationManager

Decides whether an authentication may reach something: for a request rule, a RequestAuthorizationContext.

auth.requestMatchers("/accounts/{owner}/**").access((authentication, context) ->
        new AuthorizationDecision(context.getVariables().get("owner")
                .equals(authentication.get().getName())));

Methods

public abstract AuthorizationDecision check(Supplier<Authentication> authentication, T object)The decision; null abstains, which a request rule reads as granted.

Method details

check

public abstract AuthorizationDecision check(Supplier<Authentication> authentication, T object)
The decision; null abstains, which a request rule reads as granted.

Parameters

authentication Supplier<Authentication>
who is asking, looked up only when the rule needs it
object T
Not documented.