Package org.uberfire.security.impl

Examples of org.uberfire.security.impl.IdentityImpl


    @Override
    public Identity getIdentity() {
        try {
            return delegate.getIdentity();
        } catch (Exception e) {
            return new IdentityImpl("Anonymous");
        }
    }
View Full Code Here


    @Produces
    @RequestScoped
    public static Identity getIdentity() {
        if ( subjects.get() == null ) {
            return new IdentityImpl( Identity.ANONYMOUS, ANONYMOUS_ROLE, Collections.<String, String>emptyMap() );
        }
        return new IdentityImpl( subjects.get().getName(), subjects.get().getRoles(), subjects.get().getProperties() );
    }
View Full Code Here

        for ( final SubjectPropertiesProvider propertiesProvider : subjectPropertiesProviders ) {
            properties.putAll( propertiesProvider.loadProperties( principal ) );
        }

        final String name = principal.getName();
        final Subject result = new IdentityImpl( name, roles, properties );

        for ( final AuthenticatedStorageProvider storeProvider : authStorageProviders ) {
            storeProvider.store( httpContext, result );
        }
View Full Code Here

    @Override
    public SessionInfo doNotNullDemarshall( final EJValue ejValue,
                                            final MarshallingSession marshallingSession ) {

        return new SessionInfoImpl( ejValue.isObject().get( "id" ).isString().stringValue(),
                                    new IdentityImpl( ejValue.isObject().get( "identityId" ).isString().stringValue() ) );
    }
View Full Code Here

            if ( propertiesProvider != null ) {
                putAll( propertiesProvider.loadProperties( principal ) );
            }
        }};

        return new IdentityImpl( principal.getName(), roles, properties );
    }
View Full Code Here

            user = "<system>";
        } else {
            user = context.getUser();
        }

        return new SessionInfoImpl( sessionId, new IdentityImpl( user ) );
    }
View Full Code Here

TOP

Related Classes of org.uberfire.security.impl.IdentityImpl

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.