overview authentication fixed. Edit and Register common form improved
This commit is contained in:
parent
9ba8cb3d7d
commit
8b19ce815f
|
@ -14,13 +14,16 @@ public class OverviewServlet extends HttpServlet {
|
||||||
public void doGet(HttpServletRequest request, HttpServletResponse response)
|
public void doGet(HttpServletRequest request, HttpServletResponse response)
|
||||||
throws ServletException, IOException {
|
throws ServletException, IOException {
|
||||||
|
|
||||||
|
boolean isAuthenticated = !SecurityContextHolder.getContext().getAuthentication().getPrincipal().toString()
|
||||||
|
.equals("anonymousUser");
|
||||||
|
|
||||||
|
if (isAuthenticated) {
|
||||||
OIDCAuthenticationToken authentication = (OIDCAuthenticationToken) SecurityContextHolder.getContext().getAuthentication();
|
OIDCAuthenticationToken authentication = (OIDCAuthenticationToken) SecurityContextHolder.getContext().getAuthentication();
|
||||||
request.getSession().setAttribute("authenticated",
|
|
||||||
!authentication.getPrincipal().toString()
|
|
||||||
.equals("anonymousUser"));
|
|
||||||
StringBuilder name = new StringBuilder().append(authentication.getUserInfo().getGivenName().charAt(0));
|
StringBuilder name = new StringBuilder().append(authentication.getUserInfo().getGivenName().charAt(0));
|
||||||
name.append(authentication.getUserInfo().getFamilyName().charAt(0));
|
name.append(authentication.getUserInfo().getFamilyName().charAt(0));
|
||||||
request.getSession().setAttribute("name", name.toString());
|
request.getSession().setAttribute("name", name.toString());
|
||||||
|
}
|
||||||
|
|
||||||
response.setContentType("text/html");
|
response.setContentType("text/html");
|
||||||
request.getRequestDispatcher("./overview.jsp").include(request, response);
|
request.getRequestDispatcher("./overview.jsp").include(request, response);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ import eu.dnetlib.openaire.user.pojos.RegisteredService;
|
||||||
import eu.dnetlib.openaire.usermanagement.utils.RegisteredServicesUtils;
|
import eu.dnetlib.openaire.usermanagement.utils.RegisteredServicesUtils;
|
||||||
import eu.dnetlib.openaire.usermanagement.utils.TokenUtils;
|
import eu.dnetlib.openaire.usermanagement.utils.TokenUtils;
|
||||||
import org.apache.commons.validator.routines.UrlValidator;
|
import org.apache.commons.validator.routines.UrlValidator;
|
||||||
|
import org.apache.http.HttpResponse;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.mitre.openid.connect.model.OIDCAuthenticationToken;
|
import org.mitre.openid.connect.model.OIDCAuthenticationToken;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -78,7 +79,7 @@ public class RegisterServiceServlet extends HttpServlet {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
System.out.println("Not authorized");
|
System.out.println("Not authorized");
|
||||||
request.getSession().setAttribute("message", "Not authorized to edit the registered service with " + id + "id.");
|
request.getSession().setAttribute("message", "Not authorized to edit the registered service with id " + id + ".");
|
||||||
response.sendRedirect("./registeredServices");
|
response.sendRedirect("./registeredServices");
|
||||||
logger.warn("Not authorized to edit the service with " + id + "id.");
|
logger.warn("Not authorized to edit the service with " + id + "id.");
|
||||||
}
|
}
|
||||||
|
@ -107,7 +108,6 @@ public class RegisterServiceServlet extends HttpServlet {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateFormFields(HttpServletRequest request, String serviceName, String description, String keyType, ServiceResponse serviceResponse) {
|
private void updateFormFields(HttpServletRequest request, String serviceName, String description, String keyType, ServiceResponse serviceResponse) {
|
||||||
String jwksUri;
|
|
||||||
if (serviceName ==null || serviceName.trim().isEmpty()) {
|
if (serviceName ==null || serviceName.trim().isEmpty()) {
|
||||||
request.getSession().setAttribute("first_name", serviceResponse.getClientName());
|
request.getSession().setAttribute("first_name", serviceResponse.getClientName());
|
||||||
}
|
}
|
||||||
|
@ -117,13 +117,15 @@ public class RegisterServiceServlet extends HttpServlet {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keyType == null || keyType.trim().isEmpty()) {
|
if (keyType == null || keyType.trim().isEmpty()) {
|
||||||
if (serviceResponse.getJwksUri()!=null){
|
System.out.println("Service response URI " + serviceResponse.getJwksUri());
|
||||||
keyType = "uri";
|
if (serviceResponse.getJwksUri() != null) {
|
||||||
jwksUri = serviceResponse.getJwksUri();
|
request.getSession().setAttribute("key_radio","uri");
|
||||||
|
request.getSession().setAttribute("jwksUri", serviceResponse.getJwksUri());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
keyType = "value";
|
request.getSession().setAttribute("key_radio", "value");
|
||||||
Key key = serviceResponse.getJwks().keys[0];
|
Key key = serviceResponse.getJwks().keys[0];
|
||||||
|
System.out.println("Service response keys " + serviceResponse.getJwksUri());
|
||||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||||
request.getSession().setAttribute("value", gson.toJson(key));
|
request.getSession().setAttribute("value", gson.toJson(key));
|
||||||
}
|
}
|
||||||
|
@ -138,8 +140,10 @@ public class RegisterServiceServlet extends HttpServlet {
|
||||||
|
|
||||||
boolean canProceed = true;
|
boolean canProceed = true;
|
||||||
|
|
||||||
//Careful! Redirects in method
|
String mode = request.getParameter("mode").trim();
|
||||||
checkNumberOfRegisteredServices(request, response, authentication);
|
System.out.println("Mode was " + mode);
|
||||||
|
checkmode(mode);
|
||||||
|
System.out.println("Mode is " + mode);
|
||||||
|
|
||||||
String name = request.getParameter("first_name").trim();
|
String name = request.getParameter("first_name").trim();
|
||||||
String description = request.getParameter("description").trim();
|
String description = request.getParameter("description").trim();
|
||||||
|
@ -148,7 +152,6 @@ public class RegisterServiceServlet extends HttpServlet {
|
||||||
String jwksString = null;
|
String jwksString = null;
|
||||||
Jwks jwks = null;
|
Jwks jwks = null;
|
||||||
|
|
||||||
|
|
||||||
if (keyType.equals("uri")) {
|
if (keyType.equals("uri")) {
|
||||||
jwksUri = request.getParameter("uri");
|
jwksUri = request.getParameter("uri");
|
||||||
String[] schemes = {"https"};
|
String[] schemes = {"https"};
|
||||||
|
@ -184,6 +187,11 @@ public class RegisterServiceServlet extends HttpServlet {
|
||||||
String serverRequestJSON;
|
String serverRequestJSON;
|
||||||
String serverMessage;
|
String serverMessage;
|
||||||
|
|
||||||
|
if(mode.equals("create")) {
|
||||||
|
System.out.println("In create...");
|
||||||
|
//Careful! Redirects in method
|
||||||
|
checkNumberOfRegisteredServices(request, response, authentication);
|
||||||
|
|
||||||
if (keyType.equals("uri")){
|
if (keyType.equals("uri")){
|
||||||
serverRequestJSON = createServiceJson(name, description, email, jwksUri);
|
serverRequestJSON = createServiceJson(name, description, email, jwksUri);
|
||||||
} else {
|
} else {
|
||||||
|
@ -195,6 +203,7 @@ public class RegisterServiceServlet extends HttpServlet {
|
||||||
if (serverMessage == null) {
|
if (serverMessage == null) {
|
||||||
request.getSession().setAttribute("message", "There was an error registering your service. Please try again later.");
|
request.getSession().setAttribute("message", "There was an error registering your service. Please try again later.");
|
||||||
response.sendRedirect("./registeredServices");
|
response.sendRedirect("./registeredServices");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
serviceResponse = new Gson().fromJson(serverMessage, ServiceResponse.class);
|
serviceResponse = new Gson().fromJson(serverMessage, ServiceResponse.class);
|
||||||
String aai_id = serviceResponse.getId();
|
String aai_id = serviceResponse.getId();
|
||||||
|
@ -212,6 +221,73 @@ public class RegisterServiceServlet extends HttpServlet {
|
||||||
response.sendRedirect("./registeredServices");
|
response.sendRedirect("./registeredServices");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
String serviceId = request.getParameter("id");
|
||||||
|
int serviceIdInt = 0;
|
||||||
|
|
||||||
|
if (serviceId == null || serviceId.isEmpty()) { //TODO WRONG MESSAGE
|
||||||
|
request.getSession().setAttribute("message", "Service with id " + serviceId + " does not exist.");
|
||||||
|
response.sendRedirect("./registeredServices");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
System.out.println("In edit...");
|
||||||
|
try {
|
||||||
|
serviceIdInt = Integer.parseInt(serviceId);
|
||||||
|
if (!registeredServicesUtils.isAuthorized(authentication.getSub(), serviceIdInt)) {
|
||||||
|
request.getSession().setAttribute("message", "You have no permission to edit the service.");
|
||||||
|
response.sendRedirect("./registeredServices");
|
||||||
|
}
|
||||||
|
|
||||||
|
RegisteredService registeredService = null;
|
||||||
|
registeredService = registeredServicesUtils.getRegisteredServiceDao().fetchRegisteredServiceById(serviceIdInt);
|
||||||
|
|
||||||
|
if (registeredService != null && registeredService.getAai_id() != null) {
|
||||||
|
serviceResponse = tokenUtils.getRegisteredService(registeredService.getAai_id(), accessToken);
|
||||||
|
|
||||||
|
request.getSession().setAttribute("serviceId", serviceResponse.getId());
|
||||||
|
System.out.println("service client name " + serviceResponse.getClientName());
|
||||||
|
request.getSession().setAttribute("first_name", serviceResponse.getClientName());
|
||||||
|
System.out.println("service client description " + serviceResponse.getClientDescription());
|
||||||
|
request.getSession().setAttribute("description", serviceResponse.getClientDescription());
|
||||||
|
|
||||||
|
HttpResponse resp = tokenUtils.updateService(serviceId, authentication.getSub(), name, description, authentication.getUserInfo().getEmail(), accessToken);
|
||||||
|
|
||||||
|
if (resp.getStatusLine().getStatusCode()==200) {
|
||||||
|
|
||||||
|
registeredService = new RegisteredService();
|
||||||
|
registeredService.setName(name);
|
||||||
|
registeredService.setAai_id(serviceId);
|
||||||
|
try {
|
||||||
|
registeredServicesUtils.getRegisteredServiceDao().update(registeredService);
|
||||||
|
} catch (SQLException sqle) {
|
||||||
|
logger.error("Unable to contact db.", sqle);
|
||||||
|
request.getSession().setAttribute("message", "Fail to delete the service. Please try again later.");
|
||||||
|
response.setContentType("text/html");
|
||||||
|
request.getRequestDispatcher("./registeredServices.jsp").include(request, response);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
request.getSession().setAttribute("success", "Your service with name '" + name + "' was successfully updated");
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
request.getSession().setAttribute("message", "Service with id " + serviceId + " does not exist.");
|
||||||
|
response.sendRedirect("./registeredServices");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (SQLException sqle) {
|
||||||
|
logger.error("Unable to access service with id " + serviceId, sqle);
|
||||||
|
request.getSession().setAttribute("message", "There was an error accessing your service.");
|
||||||
|
response.sendRedirect("./registeredServices");
|
||||||
|
|
||||||
|
} catch (NumberFormatException nfe) {
|
||||||
|
logger.error("Unable to access service with id " + serviceId, nfe);
|
||||||
|
request.getSession().setAttribute("message", "Service with id " + serviceId + " does not exist.");
|
||||||
|
response.sendRedirect("./registeredServices");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//something is wrong with the form and the error messages will appear
|
//something is wrong with the form and the error messages will appear
|
||||||
|
@ -221,13 +297,23 @@ public class RegisterServiceServlet extends HttpServlet {
|
||||||
request.getSession().setAttribute("uri", jwksUri);
|
request.getSession().setAttribute("uri", jwksUri);
|
||||||
request.getSession().setAttribute("value", jwksString);
|
request.getSession().setAttribute("value", jwksString);
|
||||||
|
|
||||||
response.sendRedirect("./registerService");
|
response.sendRedirect("./registeredServices");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
response.sendRedirect("./registeredServices");
|
response.sendRedirect("./registeredServices");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void checkmode(String mode) {
|
||||||
|
if (mode!=null && !mode.isEmpty()) {
|
||||||
|
if(!mode.equals("edit")||mode.equals("create")) {
|
||||||
|
mode = "create";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
mode = "create";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private boolean keyIsValid(String keyType, String jwksUri, String jwksString) {
|
private boolean keyIsValid(String keyType, String jwksUri, String jwksString) {
|
||||||
return (keyType.equals("uri") && jwksUri != null && !jwksUri.isEmpty()) ||
|
return (keyType.equals("uri") && jwksUri != null && !jwksUri.isEmpty()) ||
|
||||||
keyType.equals("value") && jwksString != null && !jwksString.isEmpty();
|
keyType.equals("value") && jwksString != null && !jwksString.isEmpty();
|
||||||
|
|
|
@ -57,15 +57,10 @@ public class RegisteredServicesServlet extends HttpServlet {
|
||||||
getRegisteredServiceDao().fetchAllRegisteredServicesByOwner(userId);
|
getRegisteredServiceDao().fetchAllRegisteredServicesByOwner(userId);
|
||||||
System.out.println("LOAD REGISTERED SERVICES. " + registeredServices.size());
|
System.out.println("LOAD REGISTERED SERVICES. " + registeredServices.size());
|
||||||
|
|
||||||
|
if (registeredServices== null || registeredServices.isEmpty()) {
|
||||||
|
request.getSession().setAttribute("showEmptyList", true);
|
||||||
|
|
||||||
} catch (SQLException sqle) {
|
} else {
|
||||||
logger.error("Error fetching registered services for user " + userId , sqle);
|
|
||||||
request.getSession().setAttribute("message", "Error fetching registered services. " +
|
|
||||||
"Please try again later.");
|
|
||||||
request.getSession().setAttribute("showEmptyList", false);
|
|
||||||
request.getRequestDispatcher("./registeredServices.jsp").include(request, response);
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, ServiceResponse> serviceResponses = new HashMap<>();
|
Map<String, ServiceResponse> serviceResponses = new HashMap<>();
|
||||||
Map<String, String> serviceKey = new HashMap<>();
|
Map<String, String> serviceKey = new HashMap<>();
|
||||||
|
|
||||||
|
@ -80,13 +75,21 @@ public class RegisteredServicesServlet extends HttpServlet {
|
||||||
name.append(authentication.getUserInfo().getFamilyName().charAt(0));
|
name.append(authentication.getUserInfo().getFamilyName().charAt(0));
|
||||||
request.getSession().setAttribute("name", name.toString());
|
request.getSession().setAttribute("name", name.toString());
|
||||||
request.getSession().setAttribute("reachedLimit", reachedLimit);
|
request.getSession().setAttribute("reachedLimit", reachedLimit);
|
||||||
request.getSession().setAttribute("test", "TEST");
|
|
||||||
System.out.println("REACHED LIMIT??? " + reachedLimit);
|
System.out.println("REACHED LIMIT??? " + reachedLimit);
|
||||||
|
|
||||||
|
|
||||||
request.getSession().setAttribute("services", serviceResponses);
|
request.getSession().setAttribute("services", serviceResponses);
|
||||||
request.getSession().setAttribute("keys", serviceKey);
|
request.getSession().setAttribute("keys", serviceKey);
|
||||||
request.getSession().setAttribute("registeredServices", registeredServices);
|
request.getSession().setAttribute("registeredServices", registeredServices);
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (SQLException sqle) {
|
||||||
|
logger.error("Error fetching registered services for user " + userId , sqle);
|
||||||
|
request.getSession().setAttribute("message", "Error fetching registered services. " +
|
||||||
|
"Please try again later.");
|
||||||
|
request.getSession().setAttribute("showEmptyList", false);
|
||||||
|
request.getRequestDispatcher("./registeredServices.jsp").include(request, response);
|
||||||
|
}
|
||||||
|
|
||||||
response.setContentType("text/html");
|
response.setContentType("text/html");
|
||||||
request.getRequestDispatcher("./registeredServices.jsp").include(request, response);
|
request.getRequestDispatcher("./registeredServices.jsp").include(request, response);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,14 +43,29 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- CENTER SIDE -->
|
<!-- CENTER SIDE -->
|
||||||
<div class="uk-width-2-3@l uk-width-2-3@m">
|
<div class="uk-width-2-3@l uk-width-2-3@m">
|
||||||
|
>>>>>> ${param.id}
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${not empty param.id}">
|
||||||
|
<h4 class="uk-margin-remove-top uk-text-bold uk-text-primary">Edit service</h4>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
<h4 class="uk-margin-remove-top uk-text-bold uk-text-primary">Add a new service</h4>
|
<h4 class="uk-margin-remove-top uk-text-bold uk-text-primary">Add a new service</h4>
|
||||||
<!-- REGISTER FORM -->
|
</c:otherwise>
|
||||||
PPPPPPPPP
|
</c:choose>
|
||||||
${registeredService}
|
|
||||||
|
|
||||||
|
<!-- REGISTER FORM -->
|
||||||
<div id="registerForm">
|
<div id="registerForm">
|
||||||
<form action="registerService" method="POST" role="form" class="m-t uk-form-horizontal"
|
<form action="registerService" method="POST" role="form" class="m-t uk-form-horizontal"
|
||||||
id="register_form">
|
id="register_form">
|
||||||
|
<input type="hidden" name="id" value="${param.id}"/>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test = "${not empty param.id}">
|
||||||
|
<input type="hidden" name="mode" value="edit"/>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<input type="hidden" name="mode" value="create"/>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
|
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
|
||||||
<div class="alert alert-success" aria-hidden="true" style="display: none;"></div>
|
<div class="alert alert-success" aria-hidden="true" style="display: none;"></div>
|
||||||
<div class="alert alert-danger" aria-hidden="true" style="display: none;"></div>
|
<div class="alert alert-danger" aria-hidden="true" style="display: none;"></div>
|
||||||
|
@ -58,7 +73,7 @@
|
||||||
<div class="uk-margin-medium-top">
|
<div class="uk-margin-medium-top">
|
||||||
<label class="uk-form-label uk-text-bold" for="first_name">Name*</label>
|
<label class="uk-form-label uk-text-bold" for="first_name">Name*</label>
|
||||||
<input id="first_name" name="first_name" type="text" placeholder="Name (*)"
|
<input id="first_name" name="first_name" type="text" placeholder="Name (*)"
|
||||||
class="uk-input" onkeyup="validate()" onfocusout="nameTouched = true;validate()" value=${first_name}>
|
class="uk-input" onkeyup="validate()" onfocusout="nameTouched = true;validate()" value="${first_name}">
|
||||||
<c:remove var="first_name" scope="session"/>
|
<c:remove var="first_name" scope="session"/>
|
||||||
<div id="first_name_error" style="display:none;" class="uk-text-danger uk-text-small">Please enter a name for your
|
<div id="first_name_error" style="display:none;" class="uk-text-danger uk-text-small">Please enter a name for your
|
||||||
service.
|
service.
|
||||||
|
@ -67,7 +82,7 @@
|
||||||
<div class="uk-margin-medium-top">
|
<div class="uk-margin-medium-top">
|
||||||
<label class="uk-form-label uk-text-bold" for="description">Description</label>
|
<label class="uk-form-label uk-text-bold" for="description">Description</label>
|
||||||
<textarea id="description" name="description" type="textarea" placeholder="Description:"
|
<textarea id="description" name="description" type="textarea" placeholder="Description:"
|
||||||
class="uk-textarea" rows="3" value=${description}></textarea>
|
class="uk-textarea" rows="3" value="${description}"></textarea>
|
||||||
<c:remove var="description" scope="session"/>
|
<c:remove var="description" scope="session"/>
|
||||||
</div>
|
</div>
|
||||||
<h4 class="uk-text-bold uk-text-center">Access</h4>
|
<h4 class="uk-text-bold uk-text-center">Access</h4>
|
||||||
|
@ -117,7 +132,8 @@
|
||||||
<c:remove var="value_error" scope="session"/>
|
<c:remove var="value_error" scope="session"/>
|
||||||
</c:when>
|
</c:when>
|
||||||
<c:otherwise>
|
<c:otherwise>
|
||||||
<div id="value_error" style="display:none;" class="uk-text-danger uk-text-small">Please provide a valid JSON.</div>
|
<div id="value_error" style="display:none;" class="uk-text-danger uk-text-small">Please provide a valid JSON. The format should be
|
||||||
|
{"kty": ..., "e": ... , "use": ... , "kid": ..., "alg": ... , "n": ...} </div>
|
||||||
</c:otherwise>
|
</c:otherwise>
|
||||||
</c:choose>
|
</c:choose>
|
||||||
<c:remove var="value" scope="session"/>
|
<c:remove var="value" scope="session"/>
|
||||||
|
@ -146,7 +162,14 @@
|
||||||
<a type="submit" class="uk-button uk-button-default uk-margin-small-right"
|
<a type="submit" class="uk-button uk-button-default uk-margin-small-right"
|
||||||
href="./registeredServices">Cancel</a>
|
href="./registeredServices">Cancel</a>
|
||||||
<button id="create" type="submit" class="uk-button uk-button-primary">
|
<button id="create" type="submit" class="uk-button uk-button-primary">
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${not empty param.id}">
|
||||||
|
Edit service
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
Add new service
|
Add new service
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -85,8 +85,9 @@
|
||||||
<c:if test="${registeredServices.size() > 0}">
|
<c:if test="${registeredServices.size() > 0}">
|
||||||
<ul class="uk-list uk-list-divider">
|
<ul class="uk-list uk-list-divider">
|
||||||
<li>
|
<li>
|
||||||
<div class="uk-grid uk-child-width-1-3 uk-text-muted" uk-grid>
|
<div class="uk-grid uk-child-width-1-4 uk-text-muted" uk-grid>
|
||||||
<div>Name</div>
|
<div>Name</div>
|
||||||
|
<div>id</div>
|
||||||
<div>Creation Date</div>
|
<div>Creation Date</div>
|
||||||
<div>Actions</div>
|
<div>Actions</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -94,13 +95,16 @@
|
||||||
<c:forEach items="${registeredServices}" var="registeredService" varStatus="loop">
|
<c:forEach items="${registeredServices}" var="registeredService" varStatus="loop">
|
||||||
<c:set var="key" value="${registeredService.id}"/>
|
<c:set var="key" value="${registeredService.id}"/>
|
||||||
<li>
|
<li>
|
||||||
<div class="uk-grid uk-child-width-1-3" uk-grid>
|
<div class="uk-grid uk-child-width-1-4" uk-grid>
|
||||||
<div>
|
<div>
|
||||||
<a uk-toggle="target: #details${registeredService.id}; animation: uk-animation-fade">
|
<a uk-toggle="target: #details${registeredService.id}; animation: uk-animation-fade">
|
||||||
<span>${registeredService.name}</span>
|
<span>${registeredService.name}</span>
|
||||||
<span class="space" uk-icon="icon:info;ratio:0.7"></span>
|
<span class="space" uk-icon="icon:info;ratio:0.7"></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<span>${services[key].clientId}</span>
|
||||||
|
</div>
|
||||||
<div><fmt:formatDate value="${registeredService.date}"
|
<div><fmt:formatDate value="${registeredService.date}"
|
||||||
pattern="dd-MM-yyyy HH:mm"/>
|
pattern="dd-MM-yyyy HH:mm"/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -141,6 +145,7 @@
|
||||||
<div class="uk-alert">
|
<div class="uk-alert">
|
||||||
<p><span class="uk-text-primary">Name:</span> ${services[key].clientName}</p>
|
<p><span class="uk-text-primary">Name:</span> ${services[key].clientName}</p>
|
||||||
<p><span class="uk-text-primary">Description:</span> ${services[key].clientDescription}</p>
|
<p><span class="uk-text-primary">Description:</span> ${services[key].clientDescription}</p>
|
||||||
|
<p><span class="uk-text-primary">Service Id:</span> ${services[key].clientId}</p>
|
||||||
<p><span class="uk-text-primary">Scope:</span> openid</p>
|
<p><span class="uk-text-primary">Scope:</span> openid</p>
|
||||||
<p><span class="uk-text-primary">Grant type:</span> client credentials</p>
|
<p><span class="uk-text-primary">Grant type:</span> client credentials</p>
|
||||||
<p><span class="uk-text-primary">Authentication Method</span> Asymmetrically-signed JWT assertion</p>
|
<p><span class="uk-text-primary">Authentication Method</span> Asymmetrically-signed JWT assertion</p>
|
||||||
|
|
Loading…
Reference in New Issue