Beispiel #1
0
 public static String verifyRedirectUri(
     UriInfo uriInfo, String redirectUri, RealmModel realm, ClientModel client) {
   if (client != null)
     return verifyRedirectUri(
         uriInfo, client.getRootUrl(), redirectUri, realm, client.getRedirectUris());
   return null;
 }
Beispiel #2
0
 private static Set<String> getValidateRedirectUris(UriInfo uriInfo, RealmModel realm) {
   Set<String> redirects = new HashSet<>();
   for (ClientModel client : realm.getClients()) {
     redirects.addAll(
         resolveValidRedirects(uriInfo, client.getRootUrl(), client.getRedirectUris()));
   }
   return redirects;
 }
Beispiel #3
0
 public static String getLogoutServiceUrl(
     UriInfo uriInfo, ClientModel client, String bindingType) {
   String logoutServiceUrl = null;
   if (SAML_POST_BINDING.equals(bindingType)) {
     logoutServiceUrl = client.getAttribute(SAML_SINGLE_LOGOUT_SERVICE_URL_POST_ATTRIBUTE);
   } else {
     logoutServiceUrl = client.getAttribute(SAML_SINGLE_LOGOUT_SERVICE_URL_REDIRECT_ATTRIBUTE);
   }
   if (logoutServiceUrl == null && client instanceof ClientModel)
     logoutServiceUrl = ((ClientModel) client).getManagementUrl();
   if (logoutServiceUrl == null || logoutServiceUrl.trim().equals("")) return null;
   return ResourceAdminManager.resolveUri(
       uriInfo.getRequestUri(), client.getRootUrl(), logoutServiceUrl);
 }
Beispiel #4
0
 @Override
 public String getRootUrl() {
   if (updated != null) return updated.getRootUrl();
   return cached.getRootUrl();
 }