Package com.porterhead.rest.authorization.exception

Examples of com.porterhead.rest.authorization.exception.InvalidAuthorizationHeaderException


    public boolean isUserInRole(String role) {
        if(role.equalsIgnoreCase(Role.anonymous.name())) {
             return true;
        }
        if(user == null) {
            throw new InvalidAuthorizationHeaderException();
        }
        return user.getRole().equalsIgnoreCase(role);
    }
View Full Code Here

TOP

Related Classes of com.porterhead.rest.authorization.exception.InvalidAuthorizationHeaderException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.