de.tsl2.nano.serviceaccess.IAuthorization Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tsl2.nano.serviceaccess Show documentation
Show all versions of tsl2.nano.serviceaccess Show documentation
TSL2 JEE Service Access (Generic Services for Entity Access, JEE File-System-Connector, Generic Featuring, Job-Scheduling, BeanContainer, Batch, Comfortable Bean Query Definitions, JAAS, Authentification, Authorization, )
The newest version!
package de.tsl2.nano.serviceaccess;
import java.security.Principal;
import javax.security.auth.Subject;
public interface IAuthorization {
static final String PERM_READ = "read";
static final String PERM_WRITE = "write";
static final String PERM_EXE = "execute";
static final String PERM_WILDCARD = "*";
/**
* checks the current user subject to have an authorization for given role. delegates to {@link #hasAccess(String, String)} with type EXECUTE
*
* @param roleName
* @return true, if user has role
*/
boolean hasRole(String roleName);
/**
* hasRole
*
* @param roleName
* @param action
* @return true, if user has permission to access role 'name' with action.
*/
boolean hasAccess(String name, String action);
/**
* getUserObject
*
* @return user object, if defined!
*/
Object getUser();
/**
* getSubject
* @return
*/
Subject getSubject();
abstract boolean hasPrincipal(Principal principal);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy