Examples of Realm


Examples of oracle.security.jazn.realm.Realm

        Set possibleUsers = subject.getPrincipals(RealmRole.class);
        Iterator itr = possibleUsers.iterator();
        while (itr.hasNext())
        {
            RealmRole role = (RealmRole) itr.next();
            Realm realm = role.getRealm();
            String realmFullName = realm.getFullName();
            String roleSimpleName = role.getName();
            if ((realmFullName.length() > 0) &&
                roleSimpleName.startsWith(realmFullName))
            {
                // Format is "<realm full name>\<role name>"
View Full Code Here

Examples of org.apache.catalina.Realm

          return (AuthStatus.SEND_CONTINUE);
      }

      // Yes -- Validate the specified credentials and redirect
      // to the error page if they are not correct
      Realm realm = context.getRealm();
      String characterEncoding = request.getCharacterEncoding();
      if (characterEncoding != null) {
          try
         {
            request.setCharacterEncoding(characterEncoding);
         }
         catch (UnsupportedEncodingException e)
         {
            log.error(e.getLocalizedMessage(), e);
         }
      }
      String username = request.getParameter(Constants.FORM_USERNAME);
      String password = request.getParameter(Constants.FORM_PASSWORD);
      log.trace("Authenticating username '" + username + "'");
      principal = realm.authenticate(username, password);
      if (principal == null) {
          forwardToErrorPage(request, response, config);
          return (AuthStatus.FAILURE);
      }
View Full Code Here

Examples of org.apache.catalina.Realm

           return (false);
        }

        // Yes -- Validate the specified credentials and redirect
        // to the error page if they are not correct
        Realm realm = context.getRealm();
        if (characterEncoding != null) {
            request.setCharacterEncoding(characterEncoding);
        }
        String username = request.getParameter(Constants.FORM_USERNAME);
        String password = request.getParameter(Constants.FORM_PASSWORD);
        if (log.isDebugEnabled())
            log.debug("Authenticating username '" + username + "'");
        principal = realm.authenticate(username, password);
        if (principal == null) {
           forwardToErrorPage(request, response, config);
           return (false);
        }
View Full Code Here

Examples of org.apache.catalina.Realm

         if (trace)
            log.trace("Already authenticated '" + principal.getName() + "'");
         return true;
      }

      Realm realm = context.getRealm();
      Session session = request.getSessionInternal(true);

      String username = getUserId(request);
      String password = getSessionCookie(request);

      //Check if there is sso id as well as sessionkey
      if (username == null || password == null)
      {
         log.trace("Username is null or password(sessionkey) is null:fallback to form auth");
         return super.authenticate(request, response, config);
      }
      principal = realm.authenticate(username, password);

      if (principal == null)
      {
         forwardToErrorPage(request, response, config);
         return false;
View Full Code Here

Examples of org.apache.catalina.Realm

   protected boolean authenticate(Request request,
                                           HttpServletResponse response,
                                           LoginConfig config)
       throws IOException
  
      Realm realm = context.getRealm();
      /**
       * You can get the userid/credential from the header
       */
      Session session = request.getSessionInternal(true);
      String username = request.getHeader("JBOSS_TEST_USER_NAME");
      String password = request.getHeader("JBOSS_TEST_CREDENTIAL");
      log.debug("Test UserName =" + username);
      log.debug("Test cred present?:" + (password != null));
      Principal principal = realm.authenticate(username,password);
      if(principal == null)
      {
         response.sendError(HttpServletResponse.SC_FORBIDDEN);
         return false;
      }
View Full Code Here

Examples of org.apache.catalina.Realm

            org.jboss.resteasy.auth.oauth.OAuthConsumer consumer,
            OAuthToken accessToken)
    {
       
        Set<String> roles = oauthProvider.convertPermissionsToRoles(accessToken.getPermissions());
        Realm realm = new OAuthRealm(roles);
        context.setRealm(realm);
       
        final Principal principal = new GenericPrincipal(realm, consumer.getKey(), "", new ArrayList<String>(roles));
        ((Request)request).setUserPrincipal(principal);
        ((Request)request).setAuthType("OAuth");
View Full Code Here

Examples of org.apache.deltacloud.client.Realm

*/
public class RealmDomUnmarshallingTest {

  @Test
  public void realmMayBeUnmarshalled() throws DeltaCloudClientException {
    Realm realm = new Realm();
    ByteArrayInputStream inputStream = new ByteArrayInputStream(RealmResponseFakes.realmResponse.response.getBytes());
    new RealmUnmarshaller().unmarshall(inputStream, realm);
    assertNotNull(realm);
    assertEquals(RealmResponseFakes.realmResponse.id, realm.getId());
    assertEquals(RealmResponseFakes.realmResponse.name, realm.getName());
    assertEquals(RealmState.valueOf(RealmResponseFakes.realmResponse.state.toUpperCase()), realm.getState());
    assertEquals(RealmResponseFakes.realmResponse.getIntLimit(), realm.getLimit());
  }
View Full Code Here

Examples of org.apache.geronimo.security.deploy.Realm

            Subject roleDesignate = new Subject();
            Set principalSet = new HashSet();

            Iterator realms = role.getRealms().values().iterator();
            while (realms.hasNext()) {
                Realm realm = (Realm) realms.next();

                Iterator principals = realm.getPrincipals().iterator();
                while (principals.hasNext()) {
                    Principal principal = (Principal) principals.next();

                    RealmPrincipal realmPrincipal = ConfigurationUtil.generateRealmPrincipal(principal, realm.getRealmName());

                    if (realmPrincipal == null) throw new DeploymentException("Unable to create realm principal");

                    principalSet.add(realmPrincipal);
                    if (principal.isDesignatedRunAs()) roleDesignate.getPrincipals().add(realmPrincipal);
View Full Code Here

Examples of org.apache.shiro.realm.Realm

        // temporarily disabled for preview to prevent confusion.
//        LocalAdminUserRealm localAdminRealm = new LocalAdminUserRealm("local-accounts");
//        localAdminRealm.setCredentialsMatcher(new HashedCredentialsMatcher("SHA2"));
//        setupLocalUser(api, localAdminRealm, app);

        Realm serverRestInterfaceRealm = injector.getInstance(ServerRestInterfaceRealm.class);
        final DefaultSecurityManager securityManager =
                new DefaultSecurityManager(
                        Lists.newArrayList(serverRestInterfaceRealm)
                );
        // disable storing sessions (TODO we might want to write a session store bridge to play's session cookie)
View Full Code Here

Examples of org.apache.tomcat.Realm

     *
     * @param realm The newly associated Realm
     */
    public void setRealm(Realm realm) {

  Realm oldRealm = this.realm;
  this.realm = realm;
  if (this.realm != null)
      this.realm.setContainer(this);
  support.firePropertyChange("realm", oldRealm, this.realm);

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.