Package org.apache.cxf.security

Examples of org.apache.cxf.security.LoginSecurityContext


            }
        } else {
            userRoles = null;
        }
       
        return new LoginSecurityContext() {
            public Principal getUserPrincipal() {
                return p;
            }
            public boolean isUserInRole(String role) {
                if (roles == null) {
View Full Code Here


        SecurityContext sc = message.get(SecurityContext.class);
       
        if (sc instanceof LoginSecurityContext) {
            Principal principal = sc.getUserPrincipal();
           
            LoginSecurityContext loginSecurityContext = (LoginSecurityContext)sc;
            Set<Principal> principalRoles = loginSecurityContext.getUserRoles();
            List<String> roles = new ArrayList<String>();
            if (principalRoles != null) {
                for (Principal p : principalRoles) {
                    if (p != principal) {
                        roles.add(p.getName());
View Full Code Here

            // Failure expected
        }
    }
   
    private SecurityContext createSecurityContext(final String user, final String role) {
        return new LoginSecurityContext() {

            @Override
            public Principal getUserPrincipal() {
                return new Principal() {
                    public String getName() {
View Full Code Here

            }
        } else {
            userRoles = null;
        }
       
        return new LoginSecurityContext() {
            public Principal getUserPrincipal() {
                return p;
            }
            public boolean isUserInRole(String role) {
                if (roles == null) {
View Full Code Here

TOP

Related Classes of org.apache.cxf.security.LoginSecurityContext

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.