Examples of ClientDetails


Examples of beans.user.client.entity.ClientDetails

                    && !isSuperUser()) {
                        throw new ESecurity("Отсутствует право изменять данные сотрудников");
            }
        }

        ClientDetails d = (ClientDetails) details;
       
        String msg = FormatChecker.checkEmail(d.email);
        if(msg == null) {
            msg = FormatChecker.checkPhones(d.telephones);
        }
View Full Code Here

Examples of beans.user.client.entity.ClientDetails

            emc.setClient(entity);
        } else {
            auditDoc = new AuditDoc<Emc>(emc, getCollaborator());
        }

        ClientDetails d = (ClientDetails)details;
        if (d.numberEmc != null && !d.numberEmc.isEmpty() && !d.noCheckEmcNum) {
            int entityCount = getEntityCount(Emc.class, new Field[]{new Field("number", d.numberEmc),
                                                                    new Field("client", entity, Field.OPERATOR_NOT_EQUAL)});
            if (entityCount > 0) {
                throw new ClipsServerException("Уже существует ЭМК с данным номером");
View Full Code Here

Examples of beans.user.client.entity.ClientDetails

        }
        ArrayList<Client> pacientsA = new ArrayList<Client>(pacients.values());
        HashMap<ClientUniq, ArrayList<Client>> pacientsMap = new HashMap<ClientUniq, ArrayList<Client>>();
        for (int i = 0; i < pacientsA.size(); i++) {
            Client c = pacientsA.get(i);
            ClientDetails det = c.getDetails(this);
            ClientUniq p =
                    new ClientUniq(det.surnameId, det.nameId, det.pathronId, det.born);
            ArrayList<Client> clA = pacientsMap.get(p);
            if (clA == null) {
                clA = new ArrayList<Client>();
View Full Code Here

Examples of beans.user.client.entity.ClientDetails

    }

    private ArrayList<AuditDetails> fillClientDetails(Client dst, Client src) throws ClipsServerException {
        ArrayList<AuditDetails> target = new ArrayList<AuditDetails>();
        System.out.println("        details");
        ClientDetails detailsDst = dst.getDetails(this);
        ClientDetails detailsSrc = src.getDetails(this);
        AuditDoc<Client> auditDst = new AuditDoc<Client>(dst, getCollaborator());
        if (detailsDst.socialCardCode == null || detailsDst.socialCardCode.isEmpty()) {
            dst.setSocialCardId(detailsSrc.socialCardCode);
            System.out.println("          change socialСardCode");
        }
View Full Code Here

Examples of beans.user.client.entity.ClientDetails

        if (!c.isValid()) {
            throw new EDataIntegrity("Неполные данные пациента");
        }

        //CLIENT
        ClientDetails clientDetails = new ClientDetails();
        clientDetails.surnameId = c.famID;
        clientDetails.nameId = c.nameID;
        clientDetails.pathronId = c.patronID;
        clientDetails.sexId = c.sexID;
        clientDetails.born = c.dateBorn;
        clientDetails.socialStatusId = c.socStatusID;
        clientDetails.districtId = c.districtID;
        clientDetails.inn = c.inn;
        clientDetails.snils = c.snils;
        clientDetails.numberEmc = c.numambk;
        ClientUniq cu = new ClientUniq(c.famID, c.nameID, c.patronID, c.dateBorn);
        Integer clientID = mapClient.get(cu);
        Client client = null;
        if (clientID != null && clientID != 0) {
            client = findEntity(Client.class, clientID);
        }
        if (client != null) {
            ClientDetails d2 = client.getDetails(this);
            d2.surnameId = clientDetails.surnameId;
            d2.nameId = clientDetails.nameId;

            d2.pathronId = clientDetails.pathronId;
            d2.sexId = clientDetails.sexId;
View Full Code Here

Examples of beans.user.client.entity.ClientDetails

        super(details, al);
    }

    @Override
    protected ClientDetails getNewDetails() {
        return new ClientDetails();
    }
View Full Code Here

Examples of org.springframework.security.oauth2.provider.ClientDetails

    // then
    assertThat(permitted, is(false));
  }

  private ClientDetails clientWithId(String clientId) {
    ClientDetails client = mock(ClientDetails.class);
    given(client.getClientId()).willReturn(clientId);
    return client;
  }
View Full Code Here

Examples of org.springframework.security.oauth2.provider.ClientDetails

    return client;
  }

  private ClientDetails clientWithIdAndScope(String clientId,
      Set<String> scope) {
    ClientDetails client = clientWithId(clientId);
    given(client.getScope()).willReturn(scope);
    return client;
  }
View Full Code Here

Examples of org.springframework.security.oauth2.provider.ClientDetails

  @Override
  public AuthorizationRequest updateAfterApproval(AuthorizationRequest authorizationRequest, Authentication userAuthentication) {

    String userId = userAuthentication.getName();
    String clientId = authorizationRequest.getClientId();
    ClientDetails client = clientDetailsService.loadClientByClientId(clientId);

    // This must be re-parsed here because SECOAUTH forces us to call things in a strange order
    if (Boolean.parseBoolean(authorizationRequest.getApprovalParameters().get("user_oauth_approval"))
        && authorizationRequest.getExtensions().get("csrf") != null
        && authorizationRequest.getExtensions().get("csrf").equals(authorizationRequest.getApprovalParameters().get("csrf"))) {

      authorizationRequest.setApproved(true);

      // process scopes from user input
      Set<String> allowedScopes = Sets.newHashSet();
      Map<String,String> approvalParams = authorizationRequest.getApprovalParameters();

      Set<String> keys = approvalParams.keySet();

      for (String key : keys) {
        if (key.startsWith("scope_")) {
          //This is a scope parameter from the approval page. The value sent back should
          //be the scope string. Check to make sure it is contained in the client's
          //registered allowed scopes.

          String scope = approvalParams.get(key);
          Set<String> approveSet = Sets.newHashSet(scope);

          //Make sure this scope is allowed for the given client
          if (systemScopes.scopesMatch(client.getScope(), approveSet)) {

            // If it's structured, assign the user-specified parameter
            SystemScope systemScope = systemScopes.getByValue(scope);
            if (systemScope != null && systemScope.isStructured()){
              String paramValue = approvalParams.get("scopeparam_" + scope);
View Full Code Here

Examples of org.springframework.security.oauth2.provider.ClientDetails

  }

  private void checkClientDetails(OAuth2Authentication auth) {
    if (clientDetailsService != null) {
      ClientDetails client;
      try {
        client = clientDetailsService.loadClientByClientId(auth.getOAuth2Request().getClientId());
      }
      catch (ClientRegistrationException e) {
        throw new OAuth2AccessDeniedException("Invalid token contains invalid client id");
      }
      Set<String> allowed = client.getScope();
      for (String scope : auth.getOAuth2Request().getScope()) {
        if (!allowed.contains(scope)) {
          throw new OAuth2AccessDeniedException("Invalid token contains disallowed scope (" + scope
              + ") for this client");
        }
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.