Examples of Subject


Examples of org.apache.sentry.core.Subject

    return sessState.getHiveOperation();
  }

  private Subject getCurrentSubject(HiveSemanticAnalyzerHookContext context) {
    // Extract the username from the hook context
    return new Subject(context.getUserName());
  }
View Full Code Here

Examples of org.apache.sentry.core.common.Subject

    }
  }

  @Test
  public void testDuplicateEntries() throws Exception {
    Subject user1 = new Subject("user1");
    Server server1 = new Server("server1");
    AccessURI uri = new AccessURI("file:///path/to/");
    Set<? extends Action> actions = EnumSet.of(DBModelAction.ALL, DBModelAction.SELECT, DBModelAction.INSERT);
    policyFile.addGroupsToUser(user1.getName(), true, "group1", "group1")
      .addRolesToGroup("group1",  true, "role1", "role1")
      .addPermissionsToRole("role1", true, "server=" + server1.getName() + "->uri=" + uri.getName(),
          "server=" + server1.getName() + "->uri=" + uri.getName());
    policyFile.write(iniFile);
    DBPolicyFileBackend policy = new DBPolicyFileBackend(initResource, server1.getName());
View Full Code Here

Examples of org.apache.shiro.subject.Subject

        // pretend that we had session id before
        Serializable id = null;
        if (sessionId != null && !sessionId.isEmpty()) {
            id = sessionId;
        }
        final Subject subject = new Subject.Builder().sessionId(id).buildSubject();
        ThreadContext.bind(subject);

        try {
            subject.login(new UsernamePasswordToken(createRequest.username, createRequest.password));
            final User user = userService.load(createRequest.username);
            if (user != null) {
                long timeoutInMillis = user.getSessionTimeoutMs();
                subject.getSession().setTimeout(timeoutInMillis);
            } else {
                // set a sane default. really we should be able to load the user from above.
                subject.getSession().setTimeout(TimeUnit.HOURS.toMillis(8));
            }
            subject.getSession().touch();

            // save subject in session, otherwise we can't get the username back in subsequent requests.
            ((DefaultSecurityManager) SecurityUtils.getSecurityManager()).getSubjectDAO().save(subject);

        } catch (AuthenticationException e) {
            LOG.warn("Unable to log in user " + createRequest.username, e);
        } catch (UnknownSessionException e) {
            subject.logout();
        }
        if (subject.isAuthenticated()) {
            final org.apache.shiro.session.Session session = subject.getSession();
            id = session.getId();
            result.sessionId = id.toString();
            // TODO is this even used by anyone yet?
            result.validUntil = new DateTime(session.getLastAccessTime(), DateTimeZone.UTC).plus(session.getTimeout()).toDate();
            return result;
View Full Code Here

Examples of org.blueoxygen.pedimedi.Subject

public class ActiveSubject extends SubjectForm {

  @Override
  public String execute() throws Exception {
    LogInformation log = null;
    Subject subject = getSubject();
    setSubject((Subject) manager.getById(Subject.class, getSubject()
        .getId()));
    log = getSubject().getLogInformation();

    try {
View Full Code Here

Examples of org.evolizer.ontology.annotations.subject

        Collection<Statement<?, ?>> statementsToAdd = converter.convert(instance,  RDFReflectionUtil.uriReferenceOf(method), value);
        statements.addAll(statementsToAdd);
      }
      break;
    case PREDICATE:
      subject sAnnotation = method.getAnnotation(subject.class);
      if(sAnnotation != null) {
        Object value = DefaultReflectionProvider.invoke(method, instance);
        tmpStatement.setSubject(value);
      }
     
View Full Code Here

Examples of org.exist.security.Subject

      BrokerPool db = null;
      DBBroker broker = null;
      try {
        db = BrokerPool.getInstance();
        broker = db.get(null);
        final Subject subject = broker.getSubject();
       
        final URL url = new URL("xmldb:exist://jsessionid:"+subject.getSessionId()+"@"+ uri.toString());
        connection = url.openConnection();
      } catch (final IllegalArgumentException e) {
        throw new IOException(e);
      } catch (final MalformedURLException e) {
        throw new IOException(e);
View Full Code Here

Examples of org.jallinone.subjects.java.Subject

        resourcesPanel.setItem(vo.getProgressiveHie02ITM01(),vo.getCompanyCodeSys01ITM01(),vo.getItemCodeITM01());
      }

      public void beforeLookupAction(ValueObject gridVO) {
        DetailCallOutRequestVO vo = (DetailCallOutRequestVO)calloutPanel.getVOModel().getValueObject();
        Subject subVO = (Subject)getSubjectForm().getVOModel().getValueObject();
        vo.setCompanyCodeSys01SCH03(subVO.getCompanyCodeSys01REG04());
        vo.setProgressiveReg04SCH03(subVO.getProgressiveREG04());
        itemDataLocator.getLookupFrameParams().put(ApplicationConsts.SHOW_ONLY_PURCHASED_ITEMS,new Boolean(controlFilterItems.isSelected()));
        itemDataLocator.getLookupValidationParameters().put(ApplicationConsts.SHOW_ONLY_PURCHASED_ITEMS,new Boolean(controlFilterItems.isSelected()));
        if (vo.getProgressiveReg04SCH03()!=null) {
          itemDataLocator.getLookupFrameParams().put(ApplicationConsts.PROGRESSIVE_REG04,vo.getProgressiveReg04SCH03());
          itemDataLocator.getLookupValidationParameters().put(ApplicationConsts.PROGRESSIVE_REG04,vo.getProgressiveReg04SCH03());
View Full Code Here

Examples of org.jboss.aspects.patterns.observable.Subject

   public void testAll() throws Exception
   {
      Temperature temperature = new Temperature();
      LogUtil logUtil = new LogUtil();
     
      Subject subject = (Subject) temperature;
      Observer observer = (Observer) logUtil;
     
      subject.addObserver(observer);
     
      temperature.setTemperature(10);
      assertEquals("Temperature=10", logUtil.lastLog);
   }
View Full Code Here

Examples of org.jboss.security.xacml.sunxacml.ctx.Subject

            throw new ParsingException("Request must a contain subject");

        // now go through the subject attributes
        Iterator it = subjects.iterator();
        while (it.hasNext()) {
            Subject subject = (Subject)(it.next());

            URI category = subject.getCategory();
            Map categoryMap = null;

            // see if we've already got a map for the category
            if (subjectMap.containsKey(category)) {
                categoryMap = (Map)(subjectMap.get(category));
            } else {
                categoryMap = new HashMap();
                subjectMap.put(category, categoryMap);
            }

            // iterate over the set of attributes
            Iterator attrIterator = subject.getAttributesAsList().iterator();

            while (attrIterator.hasNext()) {
                Attribute attr = (Attribute)(attrIterator.next());
                String id = attr.getId().toString();
View Full Code Here

Examples of org.opensaml.saml1.core.Subject

            subjectStatements.addAll(saml1.getSubjectStatements());
            subjectStatements.addAll(saml1.getAuthenticationStatements());
            subjectStatements.addAll(saml1.getAttributeStatements());
            subjectStatements.addAll(saml1.getAuthorizationDecisionStatements());
            for (SubjectStatement subjectStatement : subjectStatements) {
                Subject subject = subjectStatement.getSubject();
                if (subject != null) {
                    SubjectConfirmation confirmation = subject.getSubjectConfirmation();
                    if (confirmation != null) {
                        XMLObject data = confirmation.getSubjectConfirmationData();
                        if (data instanceof ConfirmationMethod) {
                            ConfirmationMethod method = (ConfirmationMethod) data;
                            methods.add(method.getConfirmationMethod());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.