Package org.acegisecurity

Examples of org.acegisecurity.ConfigAttribute


    public int vote(Authentication authentication, Object object,
        ConfigAttributeDefinition config) {
        Iterator iter = config.getConfigAttributes();

        while (iter.hasNext()) {
            ConfigAttribute attr = (ConfigAttribute) iter.next();

            if (this.supports(attr)) {
                // Need to make an access decision on this invocation
                // Attempt to locate the domain object instance to process
                Object domainObject = getDomainObjectInstance(object);
View Full Code Here


        ConfigAttributeDefinition config) {
        int result = ACCESS_ABSTAIN;
        Iterator iter = config.getConfigAttributes();

        while (iter.hasNext()) {
            ConfigAttribute attribute = (ConfigAttribute) iter.next();

            if (this.supports(attribute)) {
                result = ACCESS_DENIED;

                // Attempt to find a matching granted authority
                for (int i = 0; i < authentication.getauthorities().length;
                    i++) {
                    if (attribute.getAttribute().equals(authentication
                            .getauthorities()[i].getauthority())) {
                        return ACCESS_GRANTED;
                    }
                }
            }
View Full Code Here

        ConfigAttributeDefinition config) {
        int result = ACCESS_ABSTAIN;
        Iterator iter = config.getConfigAttributes();

        while (iter.hasNext()) {
            ConfigAttribute attribute = (ConfigAttribute) iter.next();

            if (this.supports(attribute)) {
                result = ACCESS_DENIED;

                if (IS_AUTHENTICATED_FULLY.equals(attribute.getAttribute())) {
                    if (isFullyAuthenticated(authentication)) {
                        return ACCESS_GRANTED;
                    }
                }

                if (IS_AUTHENTICATED_REMEMBERED.equals(attribute.getAttribute())) {
                    if (authenticationTrustResolver.isRememberMe(authentication)
                        || isFullyAuthenticated(authentication)) {
                        return ACCESS_GRANTED;
                    }
                }

                if (IS_AUTHENTICATED_ANONYMOUSLY.equals(
                        attribute.getAttribute())) {
                    if (authenticationTrustResolver.isAnonymous(authentication)
                        || isFullyAuthenticated(authentication)
                        || authenticationTrustResolver.isRememberMe(
                            authentication)) {
                        return ACCESS_GRANTED;
View Full Code Here

        Assert.isTrue((invocation != null) && (config != null), "Nulls cannot be provided");

        Iterator iter = config.getConfigAttributes();

        while (iter.hasNext()) {
            ConfigAttribute attribute = (ConfigAttribute) iter.next();

            if (supports(attribute)) {
                if (!invocation.getHttpRequest().isSecure()) {
                    entryPoint.commence(invocation.getRequest(),
                        invocation.getResponse());
View Full Code Here

        }

        Iterator iter = config.getConfigAttributes();

        while (iter.hasNext()) {
            ConfigAttribute attribute = (ConfigAttribute) iter.next();

            if (supports(attribute)) {
                if (invocation.getHttpRequest().isSecure()) {
                    entryPoint.commence(invocation.getRequest(),
                        invocation.getResponse());
View Full Code Here

                    ConfigAttributeDefinition def = (ConfigAttributeDefinition) iter
                        .next();
                    Iterator attributes = def.getConfigAttributes();

                    while (attributes.hasNext()) {
                        ConfigAttribute attr = (ConfigAttribute) attributes
                            .next();

                        if (!this.runAsManager.supports(attr)
                            && !this.accessDecisionManager.supports(attr)
                            && ((this.afterInvocationManager == null)
View Full Code Here

            ConfigAttributeDefinition def = (ConfigAttributeDefinition) iter
                    .next();
            Iterator attributes = def.getConfigAttributes();

            while (attributes.hasNext()) {
                ConfigAttribute attr = (ConfigAttribute) attributes.next();

                if (!this.channelDecisionManager.supports(attr)) {
                    set.add(attr);
                }
            }
View Full Code Here

        Object object, ConfigAttributeDefinition config) {
        List newauthorities = new Vector();
        Iterator iter = config.getConfigAttributes();

        while (iter.hasNext()) {
            ConfigAttribute attribute = (ConfigAttribute) iter.next();

            if (this.supports(attribute)) {
                GrantedAuthorityImpl extraauthority = new GrantedAuthorityImpl(getRolePrefix()
                        + attribute.getAttribute());
                newauthorities.add(extraauthority);
            }
        }

        if (newauthorities.size() == 0) {
View Full Code Here

TOP

Related Classes of org.acegisecurity.ConfigAttribute

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.