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; }
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; }
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); }
@Override public String getRootUrl() { if (updated != null) return updated.getRootUrl(); return cached.getRootUrl(); }