Examples of AuthenticationSession


Examples of org.apache.isis.core.commons.authentication.AuthenticationSession

    }

    private synchronized void logOut() {
        LOG.info("user log out");
        saveDesktop();
        final AuthenticationSession session = IsisContext.getAuthenticationSession();
        getAuthenticationManager().closeSession(session);
        viewer.close();
        notify();
    }
View Full Code Here

Examples of org.apache.isis.core.commons.authentication.AuthenticationSession

     */
    private boolean login() {
        final AuthenticationRequest request = determineRequestIfPossible();

        // we may have enough to get a session
        AuthenticationSession session = getAuthenticationManager().authenticate(request);
        clearAuthenticationRequestViaArgs();

        if (session == null) {
            session = loginDialogPrompt(request);
        }
View Full Code Here

Examples of org.apache.isis.core.commons.authentication.AuthenticationSession

            return true;
        }
    }

    private AuthenticationSession loginDialogPrompt(final AuthenticationRequest request) {
        AuthenticationSession session;
        final LoginDialog dialog = new LoginDialog(getAuthenticationManager());
        if (request != null) {
            dialog.setUserName(request.getName());
        }
        dialog.setVisible(true);
View Full Code Here

Examples of org.apache.isis.core.commons.authentication.AuthenticationSession

        }
        viewer.setHelpViewer(helpViewer);

        frame.setViewer(viewer);

        final AuthenticationSession currentSession = IsisContext.getAuthenticationSession();
        if (currentSession == null) {
            throw new NullPointerException("No session for " + this);
        }

        setupViewFactory();
View Full Code Here

Examples of org.apache.isis.core.commons.authentication.AuthenticationSession

        if (!persistent) {
            throw new IllegalArgumentException("Object '" + adapter.titleString(null) + "' is not persistent.");
        }

        // check visibility and whether enabled
        final AuthenticationSession session = getAuthenticationSession();
       
        final Consent visibility = action.isVisible(session, adapter, Where.OBJECT_FORMS);
        if (visibility.isVetoed()) {
            return null;
        }
View Full Code Here

Examples of org.apache.isis.core.commons.authentication.AuthenticationSession

    }

    List<ObjectAssociation> determineAvailableFields(final Content content) {
        final ObjectSpecification spec = content.getSpecification();
        final ObjectAdapter target = content.getAdapter();
        final AuthenticationSession session = IsisContext.getAuthenticationSession();
        final List<ObjectAssociation> fields = spec.getAssociations(Contributed.EXCLUDED, ObjectAssociation.Filters.dynamicallyVisible(session, target, where));
        final List<ObjectAssociation> selectableFields = new ArrayList<ObjectAssociation>();
        for (final ObjectAssociation field : fields) {
            if (validField(field)) {
                selectableFields.add(field);
View Full Code Here

Examples of org.apache.isis.core.commons.authentication.AuthenticationSession

    @Override
    Content determineSecondaryContent(final Content content) {
        final ObjectSpecification spec = content.getSpecification();
        final ObjectAdapter target = content.getAdapter();
        final AuthenticationSession session = IsisContext.getAuthenticationSession();
        final List<ObjectAssociation> fields = spec.getAssociations(Contributed.EXCLUDED, ObjectAssociation.Filters.dynamicallyVisible(session, target, where));
        for (final ObjectAssociation field : fields) {
            if (field.isOneToManyAssociation()) {
                return Toolkit.getContentFactory().createFieldContent(field, target);
            }
View Full Code Here

Examples of org.apache.isis.core.commons.authentication.AuthenticationSession

        final ObjectAdapter targetAdapter = getTargetAdapter();
        final ObjectAdapter[] arguments = getArgumentsAsArray();
        final ObjectAction action = getActionMemento().getAction();

        final AuthenticationSession session = getAuthenticationSession();
        return action.executeWithRuleChecking(targetAdapter, arguments, session, WHERE_FOR_ACTION_INVOCATION);
    }
View Full Code Here

Examples of org.apache.isis.core.commons.authentication.AuthenticationSession

    @Override
    @Deprecated
    Content determineSecondaryContent(final Content content) {
        final ObjectSpecification spec = content.getSpecification();
        final ObjectAdapter target = content.getAdapter();
        final AuthenticationSession session = IsisContext.getAuthenticationSession();
        final List<ObjectAssociation> fields = spec.getAssociations(Contributed.EXCLUDED, ObjectAssociation.Filters.dynamicallyVisible(session, target, where));
        for (final ObjectAssociation field : fields) {
            if (validField(field)) {
                return Toolkit.getContentFactory().createFieldContent(field, target);
            }
View Full Code Here

Examples of org.apache.isis.core.commons.authentication.AuthenticationSession

            // we throw an authorization exception here to avoid leaking out information as to whether the object exists or not.
            throw new ObjectMember.AuthorizationException(ex);
        }

        // check that at least one property of the entity can be viewed.
        final AuthenticationSession session = getAuthenticationSession();
        final ObjectSpecification specification = objectAdapter.getSpecification();
        final List<ObjectAssociation> visibleAssociation = specification.getAssociations(Contributed.INCLUDED, ObjectAssociation.Filters.dynamicallyVisible(session, objectAdapter, Where.NOWHERE));

        if(visibleAssociation.isEmpty()) {
            throw new ObjectMember.AuthorizationException();
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.