Package org.apache.isis.core.commons.authentication

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


public class AuthenticationSessionStrategyTrusted extends AuthenticationSessionStrategyDefault {

    @Override
    public AuthenticationSession lookupValid(final ServletRequest servletRequest, final ServletResponse servletResponse) {
        final AuthenticationSession session = super.lookupValid(servletRequest, servletResponse);
        if (session != null) {
            return session;
        }

        // will always succeed.
View Full Code Here


            final ObjectAdapterMemento targetAdapterMemento,
            final ObjectAction objectAction,
            final CssMenuBuilder.CssMenuContext cssMenuContext) {

        // check visibility
        final AuthenticationSession session = getAuthenticationSession();
        final ObjectAdapter adapter = targetAdapterMemento.getObjectAdapter(ConcurrencyChecking.CHECK);
        final Consent visibility = objectAction.isVisible(session, adapter, ActionModel.WHERE_FOR_ACTION_INVOCATION);
        if (visibility.isVetoed()) {
            return null;
        }
View Full Code Here

            final ObjectAdapterMemento targetAdapterMemento,
            final ObjectAction objectAction,
            final CssMenuBuilder.CssMenuContext cssMenuContext) {

        // check visibility
        final AuthenticationSession session = getAuthenticationSession();
        final ObjectAdapter adapter = targetAdapterMemento.getObjectAdapter(ConcurrencyChecking.CHECK);
        final Consent visibility = objectAction.isVisible(session, adapter, where);
        if (visibility.isVetoed()) {
            return null;
        }
View Full Code Here

            final List<ObjectAction> associatedActions) {
        final ObjectSpecification adapterSpec = entityModel.getTypeOfSpecification();
        final ObjectAdapter adapter = entityModel.load(ConcurrencyChecking.NO_CHECK);

        final AuthenticationSessionProvider asa = (AuthenticationSessionProvider) Session.get();
        AuthenticationSession authSession = asa.getAuthenticationSession();

        final ObjectSpecification objectSpecification = entityModel.getTypeOfSpecification();
        @SuppressWarnings({ "unchecked", "deprecation" })
        Filter<ObjectAction> filter = Filters.and(
                    ObjectAction.Filters.memberOrderOf(association),
View Full Code Here

            final ObjectAdapter adapter,
            final ActionType actionType,
            final List<ObjectAction> topLevelActions) {

        final ObjectSpecification adapterSpec = adapter.getSpecification();
        final AuthenticationSession authenticationSession = getAuthenticationSession();

        @SuppressWarnings({ "unchecked", "deprecation" })
        Filter<ObjectAction> filter = Filters.and(
                ObjectAction.Filters.memberOrderNotAssociationOf(adapterSpec),
                ObjectAction.Filters.dynamicallyVisible(authenticationSession, adapter, Where.ANYWHERE),
View Full Code Here

            final ObjectAction objectAction,
            final ActionLinkFactory cssMenuLinkFactory,
            final ActionPromptProvider actionPromptModalWindowProvider) {

        // check visibility
        final AuthenticationSession session = getAuthenticationSession();
        final ObjectAdapter adapter = targetAdapterMemento.getObjectAdapter(ConcurrencyChecking.CHECK);
        final Consent visibility = objectAction.isVisible(session, adapter, where);
        if (visibility.isVetoed()) {
            return null;
        }
View Full Code Here

        return userActions;
    }

    private static Filter<ObjectAction> dynamicallyVisibleFor(final ObjectAdapter adapter) {
        final AuthenticationSessionProvider asa = (AuthenticationSessionProvider) Session.get();
        AuthenticationSession authSession = asa.getAuthenticationSession();
        return ObjectAction.Filters.dynamicallyVisible(authSession, adapter, Where.ANYWHERE);
    }
View Full Code Here

        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

       
        final AuthenticatedWebSessionForIsis wicketSession = getWebSession();
        if (wicketSession == null) {
            return;
        }
        final AuthenticationSession authenticationSession = wicketSession.getAuthenticationSession();
        if (authenticationSession == null) {
            return;
        }

        getIsisContext().openSessionInstance(authenticationSession);
View Full Code Here

        final Collection<Authenticator> compatibleAuthenticators = Collections2.filter(authenticators, AuthenticatorFuncs.compatibleWith(request));
        if (compatibleAuthenticators.size() == 0) {
            throw new NoAuthenticatorException("No authenticator available for processing " + request.getClass().getName());
        }
        for (final Authenticator authenticator : compatibleAuthenticators) {
            final AuthenticationSession authSession = authenticator.authenticate(request, getUnusedRandomCode());
            if (authSession != null) {
                userByValidationCode.put(authSession.getValidationCode(), authSession.getUserName());
                return authSession;
            }
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.commons.authentication.AuthenticationSession

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.