Examples of SimplePrincipal


Examples of com.atlassian.jwt.core.http.auth.SimplePrincipal

    }

    @Override
    protected Principal authenticate(Request request, Jwt jwt) throws JwtUserRejectedException {
        // we don't do any further validation of the user here. If the host vouches for them then ok by us
        return jwt.getSubject() == null ? null : new SimplePrincipal(jwt.getSubject());
    }
View Full Code Here

Examples of de.danet.an.util.SimplePrincipal

     * @return the principal.
     * @ejb.interface-method
     * view-type="remote"
     */
    public Principal processCreator () {
  return new SimplePrincipal (processCreator);
    }
View Full Code Here

Examples of nexj.core.util.auth.SimplePrincipal

   {
      InvocationContext context = (InvocationContext)Repository.getMetadata().getComponent("System.InvocationContext")
         .getInstance(null);

      context.setAudited(false);
      context.initialize((m_sUser == null) ? null : new SimplePrincipal(m_sUser));
      context.setLocale(Locale.getDefault());
      context.getUnitOfWork().commit();

      ThreadContextHolder.setContext(context);
View Full Code Here

Examples of org.apache.cxf.common.security.SimplePrincipal

            public Principal getUserPrincipal() {
                String login = AbstractAuthFilter.this.useUserSubject
                    ? (theSubject != null ? theSubject.getLogin() : null)
                    : info.getToken().getClient().getLoginName()
                return new SimplePrincipal(login);
            }

            public boolean isUserInRole(String role) {
                List<String> roles = null;
                if (AbstractAuthFilter.this.useUserSubject && theSubject != null) {
View Full Code Here

Examples of org.apache.cxf.common.security.SimplePrincipal

    private SAMLSecurityContext createSecurityContext(final Principal p, final List<String> roles) {
        final Set<Principal> userRoles;
        if (roles != null) {
            userRoles = new HashSet<Principal>();
            for (String role : roles) {
                userRoles.add(new SimplePrincipal(role));
            }
        } else {
            userRoles = null;
        }
       
View Full Code Here

Examples of org.apache.felix.jaas.integration.common.SimplePrincipal

    @Override
    public boolean commit() throws LoginException
    {
        if (succeeded)
        {
            subject.getPrincipals().add(new SimplePrincipal(name));
            return true;
        }
        return false;
    }
View Full Code Here

Examples of org.apache.tomcat.util.aaa.SimplePrincipal

                    msg.getString();
                } else { // Honor auth done by HTTP Server
                    req.setRemoteUser( msg.getString());
                    // XXX recycle ?
                    // Note that roles are not integrated with apache
                    req.setUserPrincipal( new SimplePrincipal( req.getRemoteUser() ));
                }
                break;

      case SC_A_AUTH_TYPE    :
    req.setAuthType( msg.getString());
View Full Code Here

Examples of org.apache.wicket.security.hive.authorization.SimplePrincipal

  protected Subject getSubject(String username, String password) throws LoginException
  {
    // TODO verify username, password, if user is not authenticated throw a LoginException
    DefaultSubject subject = new DefaultSubject();
    // grant principals to the user based on .....
    subject.addPrincipal(new SimplePrincipal("something"));
    return subject;
  }
View Full Code Here

Examples of org.jasig.cas.authentication.principal.SimplePrincipal

        assertTrue(credentials.toString().contains("unknown"));
    }
   
    public void testToStringWithPrincipal() {
        final SpnegoCredentials credentials = new SpnegoCredentials(new byte[] {});
        final Principal principal = new SimplePrincipal("test");
        credentials.setPrincipal(principal);
        assertEquals("test", credentials.toString());
    }
View Full Code Here

Examples of org.jasig.cas.client.authentication.SimplePrincipal

                // Add group principal containing role data
                final Group roleGroup = new SimpleGroup(this.roleGroupName);

                for (final String defaultRole : defaultRoles) {
                    roleGroup.addMember(new SimplePrincipal(defaultRole));
                }

                final Map<String, Object> attributes = this.assertion.getPrincipal().getAttributes();
                for (final String key : attributes.keySet()) {
                    if (this.roleAttributeNames.contains(key)) {
                        // Attribute value is Object if singular or Collection if plural
                        final Object value = attributes.get(key);
                        if (value instanceof Collection<?>) {
                            for (final Object o : (Collection<?>) value) {
                                roleGroup.addMember(new SimplePrincipal(o.toString()));
                            }
                        } else {
                            roleGroup.addMember(new SimplePrincipal(value.toString()));
                        }
                    }
                }
                this.subject.getPrincipals().add(roleGroup);
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.