Package org.apache.deltaspike.security.api

Examples of org.apache.deltaspike.security.api.Identity


public class DeltaSpikeUserProvider implements UserProvider {

    @Override
    public FeatureUser getCurrentUser() {

        Identity identity = BeanProvider.getContextualReference(Identity.class);
        if (identity == null) {
            throw new IllegalStateException("Could not obtain Identity");
        }

        if (identity.isLoggedIn()) {
            String name = identity.getUser().getId();
            return new SimpleFeatureUser(name, isFeatureAdmin(identity));
        }

        return null;
    }
View Full Code Here

TOP

Related Classes of org.apache.deltaspike.security.api.Identity

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.