本文整理汇总了Java中org.keycloak.constants.ServiceUrlConstants类的典型用法代码示例。如果您正苦于以下问题:Java ServiceUrlConstants类的具体用法?Java ServiceUrlConstants怎么用?Java ServiceUrlConstants使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ServiceUrlConstants类属于org.keycloak.constants包,在下文中一共展示了ServiceUrlConstants类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAccountUri
import org.keycloak.constants.ServiceUrlConstants; //导入依赖的package包/类
public String getAccountUri(HttpServletRequest req) {
KeycloakSecurityContext session = getSession(req);
String baseUrl = getAuthServerBaseUrl(req);
String realm = session.getRealm();
return KeycloakUriBuilder.fromUri(baseUrl).path(ServiceUrlConstants.ACCOUNT_SERVICE_PATH)
.queryParam("referrer", "app-jsp")
.queryParam("referrer_uri", getReferrerUri(req)).build(realm).toString();
}
示例2: handleCustomersRequest
import org.keycloak.constants.ServiceUrlConstants; //导入依赖的package包/类
@RequestMapping(value = "/products", method = RequestMethod.GET)
public String handleCustomersRequest(Principal principal, Model model) {
model.addAttribute("products", productService.getProducts());
model.addAttribute("principal", principal);
String logoutUri = KeycloakUriBuilder.fromUri("http://localhost:8180/auth").path(ServiceUrlConstants.TOKEN_SERVICE_LOGOUT_PATH)
.queryParam("redirect_uri", "http://localhost:8080/products").build("quickstart").toString();
model.addAttribute("logout", logoutUri);
return "products";
}
示例3: getAccountUri
import org.keycloak.constants.ServiceUrlConstants; //导入依赖的package包/类
public String getAccountUri(HttpServletRequest req) {
KeycloakSecurityContext session = getSession(req);
String baseUrl = getAuthServerBaseUrl(req);
String realm = session.getRealm();
return KeycloakUriBuilder.fromUri(baseUrl).path(ServiceUrlConstants.ACCOUNT_SERVICE_PATH)
.queryParam("referrer", "app-profile-jsp")
.queryParam("referrer_uri", getReferrerUri(req)).build(realm).toString();
}
示例4: getAccountURI
import org.keycloak.constants.ServiceUrlConstants; //导入依赖的package包/类
@Override
public String getAccountURI(HttpServletRequest req) {
KeycloakSecurityContext session = getSession(req);
String baseUrl = getAuthServerBaseUrl(req);
String realm = session.getRealm();
return KeycloakUriBuilder.fromUri(baseUrl).path(ServiceUrlConstants.ACCOUNT_SERVICE_PATH)
.queryParam("referrer", "relax-dms").build(realm).toString();
}
示例5: getAccountUri
import org.keycloak.constants.ServiceUrlConstants; //导入依赖的package包/类
public String getAccountUri(HttpServletRequest req) {
String serverPath = findKeycloakServerPath(req);
String realm = findRealmName(req);
return KeycloakUriBuilder.fromUri(serverPath).path(ServiceUrlConstants.ACCOUNT_SERVICE_PATH)
.queryParam("referrer", "app-profile-saml").build(realm).toString();
}