Examples of Password


Examples of org.eclipse.jetty.http.security.Password

        return null;
      }

      @Override
      protected void loadUsers() throws IOException {
        putUser(username, new Password(password), new String[] { role });
      }
    };

    ConstraintMapping cm = new ConstraintMapping();
    cm.setConstraint(new Constraint());
View Full Code Here

Examples of org.eclipse.jetty.util.security.Password

   *         the user name and password
   */
  public static String[] createRealmProperty(final String username,
      final String password) {
    // http://wiki.eclipse.org/Jetty/Howto/Secure_Passwords
    final Password pw = new Password(password);
    final String obf = Password.obfuscate(pw.toString());
    final String digest = Credential.MD5.digest(pw.toString());
    final String crypt = Credential.Crypt.crypt(username, pw.toString());
    log.info(String.format(
        "Password: %1$s, Obfuscated: %2$s, Digest: %3$s, Crypt: %4$s",
        pw.toString(), obf, digest, crypt));
    return new String[] { pw.toString(), obf, digest, crypt };
  }
View Full Code Here

Examples of org.jclouds.softlayer.domain.Password

      checkState(orderInSystem, "order for guest %s doesn't have login details within %sms", result,
            Long.toString(guestLoginDelay));
      result = client.getVirtualGuestClient().getVirtualGuest(result.getId());

      Password pw = get(result.getOperatingSystem().getPasswords(), 0);
      return new NodeAndInitialCredentials<VirtualGuest>(result, result.getId() + "", LoginCredentials.builder().user(pw.getUsername()).password(
            pw.getPassword()).build());
   }
View Full Code Here

Examples of org.mortbay.util.Password

        server.addListener( listener );
        log.info( "...added shutdown listener for port " + SHUTDOWN_PORT );
       
        // Set the default users and roles for the realm (note that realm name *must* match web.xml <realm-name>
        HashUserRealm realm = new HashUserRealm( "JSPWikiRealm" );
        realm.put( Users.ADMIN, new Password( Users.ADMIN_PASS ) );
        realm.addUserToRole( Users.ADMIN, "Authenticated" );
        realm.addUserToRole( Users.ADMIN, "Admin" );
        realm.put( Users.JANNE, new Password( Users.JANNE_PASS ) );
        realm.addUserToRole( Users.JANNE, "Authenticated" );
        server.addRealm( realm );
    }
View Full Code Here

Examples of org.openengsb.connector.usernamepassword.Password

                userManager.createUser("test");
                userManager.setUserCredentials("test", "password", "password");
                return null;
            }
        });
        Authentication authenticate = authenticator.authenticate("test", new Password("password"));
        assertThat(authenticate, not(nullValue()));
    }
View Full Code Here

Examples of org.openqa.jetty.util.Password

                if (realm instanceof SSORealm)
                {
                    ((SSORealm)realm).setSingleSignOn(httpRequest,
                                                                    httpResponse,
                                                                    form_cred._userPrincipal,
                                                                    new Password(form_cred._jPassword));
                }

                // Redirect to original request
                if (response!=null)
                {
                    response.setContentLength(0);
                    response.sendRedirect(response.encodeRedirectURL(nuri));
                }
            }  
            else if (response!=null)
            {
                if(log.isDebugEnabled())log.debug("Form authentication FAILED for "+form_cred._jUserName);
                if (_formErrorPage!=null)
                {
                    response.setContentLength(0);
                    response.sendRedirect(response.encodeRedirectURL
                                          (URI.addPaths(request.getContextPath(),
                                                        _formErrorPage)));
                }
                else
                {
                    response.sendError(HttpResponse.__403_Forbidden);
                }
            }
           
            // Security check is always false, only true after final redirection.
            return null;
        }
       
        // Check if the session is already authenticated.
        FormCredential form_cred = (FormCredential) session.getAttribute(__J_AUTHENTICATED);
       
        if (form_cred != null)
        {
            // We have a form credential. Has it been distributed?
            if (form_cred._userPrincipal==null)
            {
                // This form_cred appears to have been distributed.  Need to reauth
                form_cred.authenticate(realm, httpRequest);
               
                // Sign-on to SSO mechanism
                if (form_cred._userPrincipal!=null && realm instanceof SSORealm)
                {
                    ((SSORealm)realm).setSingleSignOn(httpRequest,
                                                                    httpResponse,
                                                                    form_cred._userPrincipal,
                                                                    new Password(form_cred._jPassword));
                }
            }
            else if (!realm.reauthenticate(form_cred._userPrincipal))
                // Else check that it is still authenticated.
                form_cred._userPrincipal=null;
View Full Code Here

Examples of org.opensaml.ws.wssecurity.Password

*/
public class PasswordMarshaller extends AttributedStringMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        Password password = (Password) xmlObject;
        if (!DatatypeHelper.isEmpty(password.getType())) {
            domElement.setAttributeNS(null, Password.TYPE_ATTRIB_NAME, password.getType());
        }
        super.marshallAttributes(xmlObject, domElement);
    }
View Full Code Here

Examples of org.picketlink.idm.credential.Password

     *          on login failure.
     */
    public boolean login(User user, String password) {

        credentials.setUserId(user.getLoginName());
        credentials.setCredential(new Password(password));

        if (identity.login() != Identity.AuthenticationResult.SUCCESS) {
            throw new AeroGearSecurityException(HttpStatus.AUTHENTICATION_FAILED);
        }

View Full Code Here

Examples of org.picketlink.idm.credential.Password

        identityManager.add( admin );
        identityManager.add( director );
        identityManager.add( user );
        identityManager.add( guest );

        identityManager.updateCredential( admin, new Password( "admin" ) );
        identityManager.updateCredential( director, new Password( "director" ) );
        identityManager.updateCredential( user, new Password( "user" ) );
        identityManager.updateCredential( guest, new Password( "guest" ) );

        final Role roleAdmin = new Role( "admin" );
        final Role roleAnalyst = new Role( "analyst" );

        identityManager.add( roleAdmin );
View Full Code Here

Examples of org.picketlink.idm.credential.Password

     * @param user
     */
    @Override
    public void create(User user, String password) {
        identityManager.add(user);
        identityManager.updateCredential(user, new Password(password));
    }
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.