Package org.zeroexchange.model.user

Examples of org.zeroexchange.model.user.Credential


            return null;
        }
        String userName = getCurrentUserName();
        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
        if(authentication != null && !(authentication instanceof AnonymousAuthenticationToken)) {
            Credential credential = authTokenInformer.getCredentials(authentication);
            User user = credential == null ? null : credential.getUser();
            if(user == null) {
                throw new BusinessLogicException("Unknown user '" + userName + "'");
            }
            return user;
        }
View Full Code Here


    @Override
    public Credential getCredential(User user, Class<?> credentialClass) {
        Criteria crit = getSession().createCriteria(credentialClass);
        crit.add(Restrictions.eq(Credential.FIELD_USER, user));
        Credential credential = (Credential)crit.uniqueResult();
        return credential;
    }
View Full Code Here

TOP

Related Classes of org.zeroexchange.model.user.Credential

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.