Examples of ResourceServer


Examples of org.surfnet.oaaas.model.ResourceServer

    Response validateScopeResponse = validateScope(request, Collections.singletonList(AbstractResource.SCOPE_WRITE));
    if (validateScopeResponse != null) {
      return validateScopeResponse;
    }
    ResourceServer resourceServer = getResourceServer(request, resourceServerId);

    client.setResourceServer(resourceServer);
    client.setClientId(generateClientId(client));
    client.setSecret(client.isAllowedImplicitGrant() ? null : generateSecret());
View Full Code Here

Examples of org.surfnet.oaaas.model.ResourceServer

    Response validateScopeResponse = validateScope(request, Collections.singletonList(AbstractResource.SCOPE_WRITE));
    if (validateScopeResponse != null) {
      return validateScopeResponse;
    }

    ResourceServer resourceServer = getResourceServer(request, resourceServerId);

    final Client clientFromStore = clientRepository.findByIdAndResourceServer(id, resourceServer);
    if (clientFromStore == null) {
      return Response.status(Response.Status.NOT_FOUND).build();
    }
View Full Code Here

Examples of org.surfnet.oaaas.model.ResourceServer

  protected String sanitizeClientName(String name) {
    return name.toLowerCase().replaceAll(" ", "-").replaceAll(FILTERED_CLIENT_ID_CHARS, "");
  }

  private Client getClientByResourceServer(HttpServletRequest request, Long clientId, Long resourceServerId) {
    ResourceServer resourceServer = getResourceServer(request, resourceServerId);
    return clientRepository.findByIdAndResourceServer(clientId, resourceServer);
  }
View Full Code Here

Examples of org.surfnet.oaaas.model.ResourceServer

    ResourceServer resourceServer = getResourceServer(request, resourceServerId);
    return clientRepository.findByIdAndResourceServer(clientId, resourceServer);
  }

  private ResourceServer getResourceServer(HttpServletRequest request, Long id) {
    ResourceServer resourceServer;
    if (isAdminPrincipal(request)) {
      resourceServer = resourceServerRepository.findOne(id);
    } else {
      String owner = getUserId(request);
      resourceServer = resourceServerRepository.findByIdAndOwner(id, owner);
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.