public static String getNotificationEndpoint(){ String redirectURL = IdentityUtil.getProperty(IdentityConstants.ServerConfig .NOTIFICATION_ENDPOINT); if (StringUtils.isBlank(redirectURL)){ redirectURL = IdentityUtil.getServerURL(SAMLSSOConstants.NOTIFICATION_ENDPOINT, false, false); } return redirectURL; }
public static String getNotificationEndpoint() { String redirectURL = IdentityUtil.getProperty(IdentityConstants.ServerConfig .NOTIFICATION_ENDPOINT); if (StringUtils.isBlank(redirectURL)) { redirectURL = IdentityUtil.getServerURL(SAMLSSOConstants.NOTIFICATION_ENDPOINT, false, false); } return redirectURL; }
public void sendToLoginPage(HttpServletRequest request, HttpServletResponse response, String ctx) throws AuthenticationFailedException { String iwaURL = null; try { iwaURL = IdentityUtil.getServerURL(IWAConstants.IWA_AUTH_EP, false, true) + "?" + IWAConstants.IWA_PARAM_STATE + "=" + URLEncoder.encode(ctx, IWAConstants.UTF_8); response.sendRedirect(response.encodeRedirectURL(iwaURL)); } catch (IOException e) { log.error("Error when sending to the login page :" + iwaURL, e); throw new AuthenticationFailedException("Authentication failed"); } }
public static String getOpenIDLoginPageURL() { // Read from OpenID configuration in identity.xml String openIDServerURL = IdentityUtil.getProperty(IdentityConstants.ServerConfig.OPENID_LOGIN_PAGE_URL); // If configuration are not defined, build URL from server configurations. if (StringUtils.isBlank(openIDServerURL)) { openIDServerURL = IdentityUtil.getServerURL("/authenticationendpoint/openid_login.do", false, false); } return openIDServerURL; }
public static String getOpenIDServerURL() { // Read from OpenID configuration in identity.xml String openIDServerURL = IdentityUtil.getProperty(IdentityConstants.ServerConfig.OPENID_SERVER_URL); // If configuration are not defined, build URL from server configurations. if (StringUtils.isBlank(openIDServerURL)) { openIDServerURL = IdentityUtil.getServerURL(OpenIDServerConstants.OPENID_SERVER, true, true); } return openIDServerURL; }
/** * Get Default logout endpoint from server config. * * @return */ public static String getDefaultLogoutEndpoint(){ String defaultLogoutLocation = IdentityUtil.getProperty(IdentityConstants.ServerConfig.DEFAULT_LOGOUT_ENDPOINT); if (StringUtils.isBlank(defaultLogoutLocation)){ defaultLogoutLocation = IdentityUtil.getServerURL(SAMLSSOConstants.DEFAULT_LOGOUT_ENDPOINT, false, false); } return defaultLogoutLocation; }
public void sendToLoginPage(HttpServletRequest request, HttpServletResponse response, String ctx) throws AuthenticationFailedException { String iwaURL = null; try { iwaURL = IdentityUtil.getServerURL(IWAConstants.IWA_AUTH_EP, false, true) + "?" + IWAConstants.IWA_PARAM_STATE + "=" + URLEncoder.encode(ctx, IWAConstants.UTF_8); response.sendRedirect(response.encodeRedirectURL(iwaURL)); } catch (IOException e) { log.error("Error when sending to the login page :" + iwaURL, e); throw new AuthenticationFailedException("Authentication failed"); } }
public static String getFronEndUrl(String openId, HttpServletRequest request, String relativeUrl) { String tenant = MultitenantUtils.getDomainNameFromOpenId(openId); if (getHostName().equals(tenant)) { tenant = null; } String frontEndUrl = IdentityUtil.getServerURL("/carbon/", false, true) + relativeUrl; if (tenant != null && tenant.trim().length() > 0) { return frontEndUrl.replace("/carbon/", "/t/" + tenant + "/carbon/"); } return frontEndUrl; }
public static String getFronEndUrl(String openId, HttpServletRequest request, String relativeUrl) { String tenant = MultitenantUtils.getDomainNameFromOpenId(openId); if (getHostName().equals(tenant)) { tenant = null; } String frontEndUrl = IdentityUtil.getServerURL("/carbon/", false, true) + relativeUrl; if (tenant != null && tenant.trim().length() > 0) { return frontEndUrl.replace("/carbon/", "/t/" + tenant + "/carbon/"); } return frontEndUrl; }
public static String getOAuth1AccessTokenUrl() { String oauth1AccessTokenUrl = OAuthServerConfiguration.getInstance().getOAuth1AccessTokenUrl(); if (StringUtils.isBlank(oauth1AccessTokenUrl)) { oauth1AccessTokenUrl = IdentityUtil.getServerURL("oauth/access-token", true, true); } return oauth1AccessTokenUrl; }
public static String getOIDCConsentPageUrl() { String OIDCConsentPageUrl = OAuthServerConfiguration.getInstance().getOIDCConsentPageUrl(); if (StringUtils.isBlank(OIDCConsentPageUrl)) { OIDCConsentPageUrl = IdentityUtil.getServerURL("/authenticationendpoint/oauth2_consent.do", false, false); } return OIDCConsentPageUrl; }
public static String getOAuth2ErrorPageUrl() { String oAuth2ErrorPageUrl = OAuthServerConfiguration.getInstance().getOauth2ErrorPageUrl(); if (StringUtils.isBlank(oAuth2ErrorPageUrl)) { oAuth2ErrorPageUrl = IdentityUtil.getServerURL("/authenticationendpoint/oauth2_error.do", false, false); } return oAuth2ErrorPageUrl; }
public static String getOAuth2AuthzEPUrl() { String oauth2AuthzEPUrl = OAuthServerConfiguration.getInstance().getOAuth2AuthzEPUrl(); if(StringUtils.isBlank(oauth2AuthzEPUrl)){ oauth2AuthzEPUrl = IdentityUtil.getServerURL("oauth2/authorize", true, false); } return oauth2AuthzEPUrl; }
public static String getOAuth2AuthzEPUrl() { String oauth2AuthzEPUrl = OAuthServerConfiguration.getInstance().getOAuth2AuthzEPUrl(); if (StringUtils.isBlank(oauth2AuthzEPUrl)) { oauth2AuthzEPUrl = IdentityUtil.getServerURL("oauth2/authorize", true, false); } return oauth2AuthzEPUrl; }
public static String getOAuth2TokenEPUrl() { String oauth2TokenEPUrl = OAuthServerConfiguration.getInstance().getOAuth2TokenEPUrl(); if (StringUtils.isBlank(oauth2TokenEPUrl)) { oauth2TokenEPUrl = IdentityUtil.getServerURL("oauth2/token", true, false); } return oauth2TokenEPUrl; }
public static String getOAuth2UserInfoEPUrl() { String oauth2UserInfoEPUrl = OAuthServerConfiguration.getInstance().getOauth2UserInfoEPUrl(); if (StringUtils.isBlank(oauth2UserInfoEPUrl)) { oauth2UserInfoEPUrl = IdentityUtil.getServerURL("oauth2/userinfo", true, false); } return oauth2UserInfoEPUrl; }
public static String getOAuth1AuthorizeUrl() { String oauth1AuthorizeUrl = OAuthServerConfiguration.getInstance().getOAuth1AuthorizeUrl(); if(StringUtils.isBlank(oauth1AuthorizeUrl)){ oauth1AuthorizeUrl = IdentityUtil.getServerURL("oauth/authorize-url", true, true); } return oauth1AuthorizeUrl; }
public static String getOAuth1RequestTokenUrl() { String oauth1RequestTokenUrl = OAuthServerConfiguration.getInstance().getOAuth1RequestTokenUrl(); if (StringUtils.isBlank(oauth1RequestTokenUrl)) { oauth1RequestTokenUrl = IdentityUtil.getServerURL("oauth/request-token", true, true); } return oauth1RequestTokenUrl; }
public static String getOAuth2JWKSPageUrl(String tenantDomain) throws URISyntaxException { String auth2JWKSPageUrl = OAuthServerConfiguration.getInstance().getOAuth2JWKSPageUrl(); if (StringUtils.isBlank(auth2JWKSPageUrl)) { auth2JWKSPageUrl = IdentityUtil.getServerURL("/oauth2/jwks", true, false); } if (StringUtils.isNotBlank(tenantDomain) && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals (tenantDomain)) { auth2JWKSPageUrl = getTenantUrl(auth2JWKSPageUrl, tenantDomain); } return auth2JWKSPageUrl; }
public static String getOAuth2DCREPUrl(String tenantDomain) throws URISyntaxException { String oauth2TokenEPUrl = OAuthServerConfiguration.getInstance().getOAuth2DCREPUrl(); if (StringUtils.isBlank(oauth2TokenEPUrl)) { oauth2TokenEPUrl = IdentityUtil.getServerURL("/api/identity/oauth2/dcr/v1.0/register", true, false); } if (StringUtils.isNotBlank(tenantDomain) && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals (tenantDomain)) { oauth2TokenEPUrl = getTenantUrl(oauth2TokenEPUrl, tenantDomain); } return oauth2TokenEPUrl; }