Examples of GenericPrincipal


Examples of org.apache.catalina.realm.GenericPrincipal

            protected Principal getPrincipal(String username) {
                Principal p = userPrincipals.get(username);
                if (p == null) {
                    String pass = userPass.get(username);
                    if (pass != null) {
                        p = new GenericPrincipal(username, pass,
                                userRoles.get(username));
                        userPrincipals.put(username, p);
                    }
                }
                return p;
View Full Code Here

Examples of org.apache.catalina.realm.GenericPrincipal

                                         principal.getRoles()!=null?Arrays.asList(principal.getRoles()):null);
    }

    public GenericPrincipal getPrincipal( Realm realm )
    {
        return new GenericPrincipal(realm,name,password,getRoles()!=null?Arrays.asList(getRoles()):null);
    }
View Full Code Here

Examples of org.apache.catalina.realm.GenericPrincipal

        String pwd = null;
        if ( hasPwd ) pwd = in.readUTF();
        int size = in.readInt();
        String[] roles = new String[size];
        for ( int i=0; i<size; i++ ) roles[i] = in.readUTF();
        return new GenericPrincipal(realm,name,pwd,Arrays.asList(roles));
    }
View Full Code Here

Examples of org.apache.catalina.realm.GenericPrincipal

        {
            Principal principal = request.getPrincipal();

            if (principal instanceof GenericPrincipal)
            {
                GenericPrincipal genPrincipal = (GenericPrincipal) principal;
                String userPrincipalName = genPrincipal.getUserPrincipal().getName();

                // In latest negotiation+jbossas genPrincipal.getName() is the session token instead of real kerberos username
                if (!genPrincipal.getName().equals(userPrincipalName))
                {
                    if (log.isTraceEnabled())
                    {
                        log.trace("GenericPrincipal name: " + genPrincipal.getName() + " will be changed to name: " + userPrincipalName);
                    }
                    try
                    {
                        Field nameField = GenericPrincipal.class.getDeclaredField("name");
                        nameField.setAccessible(true);
View Full Code Here

Examples of org.apache.catalina.realm.GenericPrincipal

            protected Principal getPrincipal(String username) {
                Principal p = userPrincipals.get(username);
                if (p == null) {
                    String pass = userPass.get(username);
                    if (pass != null) {
                        p = new GenericPrincipal(username, pass,
                                userRoles.get(username));
                        userPrincipals.put(username, p);
                    }
                }
                return p;
View Full Code Here

Examples of org.apache.catalina.realm.GenericPrincipal

                fireSessionEvent(Session.SESSION_DESTROYED_EVENT, null);
            }

            // Call the logout method
            if (principal instanceof GenericPrincipal) {
                GenericPrincipal gp = (GenericPrincipal) principal;
                try {
                    gp.logout();
                } catch (Exception e) {
                    manager.getContainer().getLogger().error(
                            sm.getString("standardSession.logoutfail"),
                            e);
                }
View Full Code Here

Examples of org.apache.catalina.realm.GenericPrincipal

                fireSessionEvent(Session.SESSION_DESTROYED_EVENT, null);
            }

            // Call the logout method
            if (principal instanceof GenericPrincipal) {
                GenericPrincipal gp = (GenericPrincipal) principal;
                try {
                    gp.logout();
                } catch (Exception e) {
                    manager.getContainer().getLogger().error(
                            sm.getString("standardSession.logoutfail"),
                            e);
                }
View Full Code Here

Examples of org.apache.catalina.realm.GenericPrincipal

                fireSessionEvent(Session.SESSION_DESTROYED_EVENT, null);
            }

            // Call the logout method
            if (principal instanceof GenericPrincipal) {
                GenericPrincipal gp = (GenericPrincipal) principal;
                try {
                    gp.logout();
                } catch (Exception e) {
                    manager.getContainer().getLogger().error(
                            sm.getString("standardSession.logoutfail"),
                            e);
                }
View Full Code Here

Examples of org.apache.catalina.realm.GenericPrincipal

                                         principal.getUserPrincipal()!=principal?principal.getUserPrincipal():null);
    }

    public GenericPrincipal getPrincipal( Realm realm )
    {
        return new GenericPrincipal(realm, name, password,
                getRoles()!=null?Arrays.asList(getRoles()):null,
                userPrincipal);
    }
View Full Code Here

Examples of org.apache.catalina.realm.GenericPrincipal

                log.error(sm.getString(
                        "serializablePrincipal.readPrincipal.cnfe"), e);
                throw e;
            }
        }
        return new GenericPrincipal(realm,name,pwd,Arrays.asList(roles),
                userPrincipal);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.