Package org.glassfish.security.services.api.authorization

Examples of org.glassfish.security.services.api.authorization.AzResult


        // Convert parameters
        AzSubject azSubject = makeAzSubject( subject );
        AzResource azResource = makeAzResource( resource );
        AzAction azAction = makeAzAction(action);

        AzResult azResult = getAuthorizationDecision(azSubject, azResource, azAction);

        boolean result =
            AzResult.Status.OK.equals(azResult.getStatus()) &&
            AzResult.Decision.PERMIT.equals(azResult.getDecision());
        return result;
  }
View Full Code Here


        final Attributes attrs = securityContextService.getEnvironmentAttributes();
        for (String attrName : attrs.getAttributeNames()) {
            env.addAttribute(attrName, attrs.getAttributeValue(attrName), true);
        }

        AzResult result =  provider.getAuthorizationDecision(
            subject, resource, action, env, attributeResolvers );

        if ( isDebug() ) {
            logger.log(DEBUG_LEVEL,
            "Authorization Service result for {0} was {1}.",
            new String[]{ subject.toString(), result.toString() } );
        }

        return result;
  }
View Full Code Here

            }
            mapToAzAttrs(subjectAttrs, azSubject);
            mapToAzAttrs(resourceAttrs, azResource);
            mapToAzAttrs(actionAttrs, azAction);
           
            final AzResult azResult = authService.getAuthorizationDecision(azSubject, azResource, azAction);
            a.accessCheck.setSuccessful(azResult.getDecision() == AzResult.Decision.PERMIT);
            if (isTaggable) {
                sb.append(a.tag).append(LINE_SEP).
                   append("    ").append(formattedAccessCheck(resourceURI, a.accessCheck)).append(LINE_SEP);
            }
            result &= ( (! a.accessCheck.isFailureFinal()) || a.accessCheck.isSuccessful());
View Full Code Here

            }
            mapToAzAttrs(subjectAttrs, azSubject);
            mapToAzAttrs(resourceAttrs, azResource);
            mapToAzAttrs(actionAttrs, azAction);
           
            final AzResult azResult = authService.getAuthorizationDecision(azSubject, azResource, azAction);
            a.accessCheck.setSuccessful(azResult.getDecision() == AzResult.Decision.PERMIT);
            if (isTaggable) {
                sb.append(a.tag).append(LINE_SEP).
                   append("    ").append(a.accessCheck).append(LINE_SEP);
            }
            result &= ( (! a.accessCheck.isFailureFinal()) || a.accessCheck.isSuccessful());
View Full Code Here

            }
            mapToAzAttrs(subjectAttrs, azSubject);
            mapToAzAttrs(resourceAttrs, azResource);
            mapToAzAttrs(actionAttrs, azAction);
           
            final AzResult azResult = authService.getAuthorizationDecision(azSubject, azResource, azAction);
            a.accessCheck.setSuccessful(azResult.getDecision() == AzResult.Decision.PERMIT);
            if (isTaggable) {
                sb.append(a.tag).append(LINE_SEP).
                   append("    ").append(formattedAccessCheck(resourceURI, a.accessCheck)).append(LINE_SEP);
            }
            result &= ( (! a.accessCheck.isFailureFinal()) || a.accessCheck.isSuccessful());
View Full Code Here

            }
            mapToAzAttrs(subjectAttrs, azSubject);
            mapToAzAttrs(resourceAttrs, azResource);
            mapToAzAttrs(actionAttrs, azAction);
           
            final AzResult azResult = authService.getAuthorizationDecision(azSubject, azResource, azAction);
            a.accessCheck.setSuccessful(azResult.getDecision() == AzResult.Decision.PERMIT);
            if (isTaggable) {
                sb.append(a.tag).append(LINE_SEP).
                   append("    ").append(formattedAccessCheck(resourceURI, a.accessCheck)).append(LINE_SEP);
            }
            result &= ( (! a.accessCheck.isFailureFinal()) || a.accessCheck.isSuccessful());
View Full Code Here

            }
            mapToAzAttrs(subjectAttrs, azSubject);
            mapToAzAttrs(resourceAttrs, azResource);
            mapToAzAttrs(actionAttrs, azAction);
           
            final AzResult azResult = authService.getAuthorizationDecision(azSubject, azResource, azAction);
            a.accessCheck.setSuccessful(azResult.getDecision() == AzResult.Decision.PERMIT);
            if (isTaggable) {
                sb.append(a.tag).append(LINE_SEP).
                   append("    ").append(formattedAccessCheck(resourceURI, a.accessCheck)).append(LINE_SEP);
            }
            result &= ( (! a.accessCheck.isFailureFinal()) || a.accessCheck.isSuccessful());
View Full Code Here

            }
            mapToAzAttrs(subjectAttrs, azSubject);
            mapToAzAttrs(resourceAttrs, azResource);
            mapToAzAttrs(actionAttrs, azAction);
           
            final AzResult azResult = authService.getAuthorizationDecision(azSubject, azResource, azAction);
            a.accessCheck.setSuccessful(azResult.getDecision() == AzResult.Decision.PERMIT);
            if (isTaggable) {
                sb.append(a.tag).append(LINE_SEP).
                   append("    ").append(formattedAccessCheck(resourceURI, a.accessCheck)).append(LINE_SEP);
            }
            result &= ( (! a.accessCheck.isFailureFinal()) || a.accessCheck.isSuccessful());
View Full Code Here

            }
            mapToAzAttrs(subjectAttrs, azSubject);
            mapToAzAttrs(resourceAttrs, azResource);
            mapToAzAttrs(actionAttrs, azAction);
           
            final AzResult azResult = authService.getAuthorizationDecision(azSubject, azResource, azAction);
            a.accessCheck.setSuccessful(azResult.getDecision() == AzResult.Decision.PERMIT);
            if (isTaggable) {
                sb.append(a.tag).append(LINE_SEP).
                   append("    ").append(a.accessCheck).append(LINE_SEP);
            }
            result &= ( (! a.accessCheck.isFailureFinal()) || a.accessCheck.isSuccessful());
View Full Code Here

            }
            mapToAzAttrs(subjectAttrs, azSubject);
            mapToAzAttrs(resourceAttrs, azResource);
            mapToAzAttrs(actionAttrs, azAction);
           
            final AzResult azResult = authService.getAuthorizationDecision(azSubject, azResource, azAction);
            a.accessCheck.setSuccessful(azResult.getDecision() == AzResult.Decision.PERMIT);
            if (isTaggable) {
                sb.append(a.tag).append(LINE_SEP).
                   append("    ").append(formattedAccessCheck(resourceURI, a.accessCheck)).append(LINE_SEP);
            }
            result &= ( (! a.accessCheck.isFailureFinal()) || a.accessCheck.isSuccessful());
View Full Code Here

TOP

Related Classes of org.glassfish.security.services.api.authorization.AzResult

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.