Examples of Realm


Examples of org.asynchttpclient.Realm

            }
        }
    }

    private void addAuthorizationHeader(final Request request, final HttpRequestPacket requestPacket) {
        Realm realm = request.getRealm();
        if (realm == null) {
            realm = config.getRealm();
        }
        if (realm != null && realm.getUsePreemptiveAuth()) {
            final String authHeaderValue = generateAuthHeader(realm);
            if (authHeaderValue != null) {
                requestPacket.addHeader(Header.Authorization, authHeaderValue);
            }
        }
View Full Code Here

Examples of org.atomojo.auth.service.db.Realm

      getContext().getLogger().fine("Finding realm...");
      boolean found = false;
      String realmName = AuthApplication.getStringAttribute(request,"realm-name",null);
      if (realmName!=null) {
         try {
            Realm realm = db.getRealm(realmName);
            if (realm!=null) {
               if (getContext().getLogger().isLoggable(Level.FINE)) {
                  getContext().getLogger().fine("Found realm by name "+realmName);
               }
               found = true;
               request.getAttributes().put(AuthApplication.REALM_ATTR,realm);
            }
         } catch (SQLException ex) {
            getContext().getLogger().log(Level.SEVERE,"Cannot retrieve realm.",ex);
         }
      }
      String realmId = AuthApplication.getStringAttribute(request,"realm-id",null);
      if (realmId!=null && !found) {
         try {
            Realm realm = db.getRealm(UUID.fromString(realmId));
            if (realm!=null) {
               if (getContext().getLogger().isLoggable(Level.FINE)) {
                  getContext().getLogger().fine("Found realm by id "+realmId);
               }
               found = true;
View Full Code Here

Examples of org.cafesip.jiplet.Realm

                    if (rname == null)
                    {
                        rname = JipletContainer.getInstance().getDefaultRealm();
                    }

                    Realm realm = JipletContainer.getInstance()
                            .findRealm(rname);
                    if (realm == null)
                    {
                        throw new JipletException(
                                "While creating security constraint for collection "
View Full Code Here

Examples of org.eclipse.core.databinding.observable.Realm

        super(endpointUri);
    }

    @Override
    protected List<Exchange> createExchangeList() {
        Realm realm = Realm.getDefault();
        ObjectHelper.notNull(realm, "DataBinding Realm");
        return new WritableList(realm);
    }
View Full Code Here

Examples of org.eclipse.jetty.client.security.Realm

  }

  @Override
  public void setBasicAuthorization(final String username, final String password) {
    try {
      BasicAuthentication auth = new BasicAuthentication(new Realm() {     
        @Override public String getPrincipal() { return username; }
        @Override public String getId() { return null; }
        @Override public String getCredentials() { return password; }
      });
     
View Full Code Here

Examples of org.exist.security.realm.Realm

   
    private LDAPRealm getLdapRealm(SecurityManager sm) throws XPathException {
        try {
            Method mFindRealm = sm.getClass().getDeclaredMethod("findRealmForRealmId", String.class);
            mFindRealm.setAccessible(true);
            Realm realm = (Realm)mFindRealm.invoke(sm, LDAPRealm.ID);
            if(realm == null) {
                throw new XPathException("The LDAP Realm is not in use!");
            }
            return (LDAPRealm)realm;
           
View Full Code Here

Examples of org.jboss.resteasy.skeleton.key.idm.model.data.Realm

      String clientId = formData.getFirst("client_id");
      String scopeParam = formData.getFirst("scope");
      String state = formData.getFirst("state");
      String redirect = formData.getFirst("redirect_uri");

      Realm realm = identityManager.getRealm(realmName);
      if (realm == null)
      {
         logger.debug("realm not found");
         throw new NotFoundException();
      }
      if (!realm.isEnabled())
      {
         return Response.ok("Realm not enabled").type("text/html").build();
      }
      User client = identityManager.getUser(realm, clientId);
      if (client == null)
      {
         logger.debug("client not found");
         throw new ForbiddenException();
      }
      if (!client.isEnabled())
      {
         return Response.ok("Requester not enabled").type("text/html").build();
      }


      String username = formData.getFirst("username");
      User user = identityManager.getUser(realm, username);
      if (user == null)
      {
         logger.debug("user not found");
         return loginForm("Not valid user", redirect, clientId, scopeParam, state, realm, client);
      }
      if (!user.isEnabled())
      {
         return Response.ok("Your account is not enabled").type("text/html").build();

      }
      boolean authenticated = authenticate(realm, user, formData);
      if (!authenticated) return loginForm("Unable to authenticate, try again", redirect, clientId, scopeParam, state, realm, client);

      SkeletonKeyToken token = createToken(scopeParam, realm, client, user);
      AccessCode code = new AccessCode();
      code.setExpiration((System.currentTimeMillis() / 1000) + realm.getAccessCodeLifespan());
      code.setToken(token);
      code.setClient(client);
      synchronized (accessCodeMap)
      {
         accessCodeMap.put(code.getId(), code);
      }
      String accessCode = null;
      try
      {
         accessCode = new JWSBuilder().content(code.getId().getBytes("UTF-8")).rsa256(realm.getPrivateKey());
      }
      catch (UnsupportedEncodingException e)
      {
         throw new RuntimeException(e);
      }
View Full Code Here

Examples of org.mortbay.jetty.client.security.Realm

        _httpClient=new HttpClient();
        _httpClient.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
        //_httpClient.setMaxConnectionsPerAddress(4);

        _httpClient.setRealmResolver( new SimpleRealmResolver (
                new Realm(){
                    public String getId()
                    {
                        return _username + "'s webspace"//To change body of implemented methods use File | Settings | File Templates.
                    }
View Full Code Here

Examples of org.picketlink.idm.model.basic.Realm

    @Resource(mappedName = PARTITION_MANAGER_JNDI_NAME)
    private PartitionManager partitionManager;

    @Test
    public void testConfiguration() throws Exception {
        Realm defaultRealm = this.partitionManager.getPartition(Realm.class, Realm.DEFAULT_REALM);

        if (defaultRealm == null) {
            defaultRealm = new Realm(Realm.DEFAULT_REALM);

            this.partitionManager.add(defaultRealm);
        }

        IdentityManager identityManager = this.partitionManager.createIdentityManager();
View Full Code Here

Examples of sun.security.krb5.Realm

  byte[] asn1EncPrincipal = (byte [])ois.readObject();
  byte[] encRealm = (byte [])ois.readObject();
  try {
     PrincipalName krb5Principal = new PrincipalName(new
            DerValue(asn1EncPrincipal));
     realm = (new Realm(new DerValue(encRealm))).toString();
     fullName = krb5Principal.toString() + NAME_REALM_SEPARATOR +
       realm.toString();
     nameType = krb5Principal.getNameType();
  } catch (Exception e) {
      IOException ioe = new IOException(e.getMessage());
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.