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

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


        final boolean isTaggable = ADMSEC_AUTHZ_LOGGER.isLoggable(PROGRESS_LEVEL);
        boolean result = true;
        final StringBuilder sb = (isTaggable ? (new StringBuilder(LINE_SEP)).append("AccessCheck processing on ").append(command.getClass().getName()).append(LINE_SEP) : null);
        for (final AccessCheckWork a : accessChecks) {
            final URI resourceURI = resourceURIFromAccessCheck(a.accessCheck);
            final AzSubject azSubject = authService.makeAzSubject(subject);
            final AzResource azResource = authService.makeAzResource(resourceURI);
            final AzAction azAction = authService.makeAzAction(a.accessCheck.action());
            final Map<String,String> subjectAttrs = new HashMap<String,String>();
            final Map<String,String> resourceAttrs = new HashMap<String,String>();
            final Map<String,String> actionAttrs = new HashMap<String,String>();
View Full Code Here


        final boolean isTaggable = ADMSEC_AUTHZ_LOGGER.isLoggable(PROGRESS_LEVEL);
        boolean result = true;
        final StringBuilder sb = (isTaggable ? (new StringBuilder(LINE_SEP)).append("AccessCheck processing on ").append(command.getClass().getName()).append(LINE_SEP) : null);
        for (final AccessCheckWork a : accessChecks) {
            final URI resourceURI = resourceURIFromAccessCheck(a.accessCheck);
            final AzSubject azSubject = authService.makeAzSubject(subject);
            final AzResource azResource = authService.makeAzResource(resourceURI);
            final AzAction azAction = authService.makeAzAction(a.accessCheck.action());
            final Map<String,String> subjectAttrs = new HashMap<String,String>();
            final Map<String,String> resourceAttrs = new HashMap<String,String>();
            final Map<String,String> actionAttrs = new HashMap<String,String>();
View Full Code Here

        final boolean isTaggable = ADMSEC_AUTHZ_LOGGER.isLoggable(PROGRESS_LEVEL);
        boolean result = true;
        final StringBuilder sb = (isTaggable ? (new StringBuilder(LINE_SEP)).append("AccessCheck processing on ").append(command.getClass().getName()).append(LINE_SEP) : null);
        for (final AccessCheckWork a : accessChecks) {
            final URI resourceURI = resourceURIFromAccessCheck(a.accessCheck);
            final AzSubject azSubject = authService.makeAzSubject(subject);
            final AzResource azResource = authService.makeAzResource(resourceURI);
            final AzAction azAction = authService.makeAzAction(a.accessCheck.action());
            final Map<String,String> subjectAttrs = new HashMap<String,String>();
            final Map<String,String> resourceAttrs = new HashMap<String,String>();
            final Map<String,String> actionAttrs = new HashMap<String,String>();
View Full Code Here

            throw new IllegalArgumentException( "Illegal null resource URI." );
        }
        // Note: null action means all actions (i.e., no action condition)

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

        AzResult azResult = getAuthorizationDecision(azSubject, azResource, azAction);
View Full Code Here

     * @throws IllegalArgumentException Given null or illegal subject
     * @see AuthorizationService#makeAzSubject(javax.security.auth.Subject)
     */
    @Override
    public AzSubject makeAzSubject(final Subject subject) {
        AzSubject azs = new AzSubjectImpl(subject);
        return azs;
    }
View Full Code Here

            throw new IllegalArgumentException(localStrings.getLocalString("service.resource_null", "The supplied Resource is null."));
        }
        // Note: null action means all actions (i.e., no action condition)

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

        AzResult azResult = getAuthorizationDecision(azSubject, azResource, azAction);
View Full Code Here

     * @throws IllegalArgumentException Given null or illegal subject
     * @see AuthorizationService#makeAzSubject(javax.security.auth.Subject)
     */
    @Override
    public AzSubject makeAzSubject(final Subject subject) {
        AzSubject azs = new AzSubjectImpl(subject);
        return azs;
    }
View Full Code Here

    return logger.isLoggable(DEBUG_LEVEL);
  }

  // Helpers
  private AzSubject makeAzSubject(final Subject subject) {
    AzSubject azs = new AzSubjectImpl(subject);
    return azs;
  }
View Full Code Here

  public AzSubject makeAzSubject(Subject subject) {

      if (subject == null)
          return null;
     
      AzSubject azs = new AzSubjectImpl();

      Set<Principal> principals = subject.getPrincipals();

      String AttName = Principal.class.getSimpleName();
      for (Principal p : principals) {
          String pname = p.getName();
          azs.addAttribute(AttName, pname, false);
      }
     
    return azs;
  }
View Full Code Here

  public AzSubject makeAzSubject(Subject subject) {

      if (subject == null)
          return null;
     
      AzSubject azs = new AzSubjectImpl();

      Set<Principal> principals = subject.getPrincipals();

      String AttName = Principal.class.getSimpleName();
      for (Principal p : principals) {
          String pname = p.getName();
          azs.addAttribute(AttName, pname, false);
      }
     
    return azs;
  }
View Full Code Here

TOP

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

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.