Package org.picketlink.idm.credential

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


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

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

        credentialMatcher.validate(user, password);

        if (credentialMatcher.hasExpired()) {
            throw new AeroGearSecurityException(HttpStatus.CREDENTIAL_HAS_EXPIRED);
View Full Code Here

     * @param user
     * @param password
     * @return builder implementation
     */
    public void validate(Agent user, String password) {
        Credentials credential = new UsernamePasswordCredentials(user.getLoginName(), new Password(password));
        identityManager.validateCredentials(credential);
        this.credential = credential;
    }
View Full Code Here

        identityManager.add(user);

        assertNotNull(BasicModel.getUser(identityManager, user.getLoginName()));

        Password password = new Password("abcd1234");

        identityManager.updateCredential(user, password);

        UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(user.getLoginName(), password);
View Full Code Here

    public void testAuthentication() {
        User user = new User("johny");

        this.identityManager.add(user);

        Password password = new Password("abcd1234");

        this.identityManager.updateCredential(user, password);

        Role role = new Role("admin");
View Full Code Here

        identityManager.add(user);

        assertNotNull(BasicModel.getUser(identityManager, user.getLoginName()));

        Password password = new Password("abcd1234");

        identityManager.updateCredential(user, password);

        UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(user.getLoginName(), password);
View Full Code Here

    @InSequence(3)
    public void testCredentialManagement() throws Exception {
        PartitionManager partitionManager = getPartitionManager();
        IdentityManager identityManager = partitionManager.createIdentityManager();
        User user = getUser(identityManager, "johny");
        Password password = new Password("abcd1234");

        identityManager.updateCredential(user, password);

        UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(user.getLoginName(), password);
View Full Code Here

     *          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

     * @param user
     */
    @Override
    public void create(User user, String password) {
        identityManager.add(user);
        identityManager.updateCredential(user, new Password(password));
    }
View Full Code Here

        /*
         * Note: Password will be encoded in SHA-512 with SecureRandom-1024 salt
         * See http://lists.jboss.org/pipermail/security-dev/2013-January/000650.html for more information
         */
        this.identityManager.add(user);
        this.identityManager.updateCredential(user, new Password("123"));

        Role roleDeveloper = new SimpleRole("simple");
        Role roleAdmin = new SimpleRole("admin");

        this.identityManager.add(roleDeveloper);
View Full Code Here

TOP

Related Classes of org.picketlink.idm.credential.Password

Copyright © 2018 www.massapicom. 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.