All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.muserver.rest.Authorizer Maven / Gradle / Ivy

There is a newer version: 2.0.3
Show newest version
package io.muserver.rest;

import java.security.Principal;

/**
 * A class that can check if a principle is in a given role.
 * @see BasicAuthSecurityFilter
 */
public interface Authorizer {
    /**
     * Checks if a user is in a role
     * @param principal The user, which was created by {@link UserPassAuthenticator#authenticate(String, String)}
     * @param role A role to check
     * @return Returns true if the user is in the given role; otherwise false.
     */
    boolean isInRole(Principal principal, String role);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy