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

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


        return ACTION;
    }

    @Override
    public void process(final RequestContext context) throws IOException {
        final AuthenticationSession session = context.getSession();
        if (session == null) {
            throw new NotLoggedInException();
        }

        final String parentId = context.getParameter(OBJECT);
View Full Code Here


    // Debug
    // ////////////////////////////
    public void append(final DebugBuilder debug) {
        debug.startSection("Request");
        debug.appendTitle("User");
        final AuthenticationSession session = getSession();
        debug.appendln("Session", session);
        if (session != null) {
            debug.appendln("Name", session.getUserName());
            debug.appendln("Roles", session.getRoles());
        }

        debug.appendTitle("context");
        debug.appendln("Parent request path", requestedParentPath);
        debug.appendln("Requested file", requestedFile);
View Full Code Here

    @Override
    public void process(final RequestContext context) throws IOException {
        final String username = context.getParameter("username");
        final String password = context.getParameter("password");
        final AuthenticationSession session = UserManager.authenticate(new AuthenticationRequestPassword(username, password));

        String view;
        if (session == null) {
            final FormState formState = new FormState();
            formState.setError("Failed to login. Check the username and ensure that your password was entered correctly");
View Full Code Here

    @Override
    protected void doExecute(final Context context, final ViewPane content, final ObjectAdapter adapter, final String field) {
        final String id = context.mapObject(adapter);
        final ObjectSpecification specification = adapter.getSpecification();

        final AuthenticationSession authenticationSession = getAuthenticationSession();

        createObjectView(context, adapter, content, id);

        // // TODO: this test should be done by the ImmutableFacetFactory
        // installing an immutableFacet on every
View Full Code Here

    private final HtmlFileParser parser = new HtmlFileParser(processors);
    private final Encoder encoder = new SimpleEncoder();

    public void process(final RequestContext context, final String servletPath) {
        LOG.debug("processing request " + servletPath);
        final AuthenticationSession session = UserManager.startRequest(context);
        LOG.debug("exsiting session: " + session);

        IsisContext.getPersistenceSession().getTransactionManager().startTransaction();
        context.setRequestPath(servletPath);
        context.startRequest();
View Full Code Here

        return ACTION;
    }

    @Override
    public void process(final RequestContext context) throws IOException {
        AuthenticationSession session = context.getSession();
        if (session == null) {
            session = new AnonymousSession();
        }

        try {
View Full Code Here

    private void switchUser(final LogonFixture logonFixture) {
        getTransactionManager().endTransaction();
        IsisContext.closeSession();
        final AuthenticationRequestLogonFixture authRequest = new AuthenticationRequestLogonFixture(logonFixture);
        final AuthenticationSession session = getAuthenticationManager().authenticate(authRequest);
        IsisContext.openSession(session);
        getTransactionManager().startTransaction();
    }
View Full Code Here

        final InstallerLookupDefault installerLookup = new InstallerLookupDefault();
        isisConfigurationBuilder.injectInto(installerLookup);
        installerLookup.init();

        IsisSystemUsingInstallersWithinJunit system = null;
        AuthenticationSession session = null;
        try {
            // init the system; cf similar code in Isis and
            // IsisServletContextInitializer
            final DeploymentType deploymentType = DeploymentType.PROTOTYPE;
View Full Code Here

    // //////////////////////////////////////////////////////////////

    @Override
    public OpenSessionResponse openSession(final OpenSessionRequest request2) {
        final AuthenticationRequestPassword request = new AuthenticationRequestPassword(request2.getUsername(), request2.getPassword());
        final AuthenticationSession session = authenticationManager.authenticate(request);
        return new OpenSessionResponse(session);
    }
View Full Code Here

     * {@link OneToManyAssociation}s.
     */
    @Override
    public SetAssociationResponse setAssociation(final SetAssociationRequest request) {

        final AuthenticationSession session = request.getSession();
        final String fieldIdentifier = request.getFieldIdentifier();
        final IdentityData targetData = request.getTarget();
        final IdentityData associateData = request.getAssociate();

        if (LOG.isDebugEnabled()) {
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.