keycloak-scim/services/src/main/java/org/keycloak/url/RequestHostnameProvider.java

26 lines
585 B
Java
Raw Normal View History

2018-07-30 20:38:43 +00:00
package org.keycloak.url;
import org.keycloak.urls.HostnameProvider;
import javax.ws.rs.core.UriInfo;
@Deprecated
2018-07-30 20:38:43 +00:00
public class RequestHostnameProvider implements HostnameProvider {
@Override
public String getScheme(UriInfo originalUriInfo) {
return originalUriInfo.getRequestUri().getScheme();
}
2018-07-30 20:38:43 +00:00
@Override
public String getHostname(UriInfo originalUriInfo) {
return originalUriInfo.getBaseUri().getHost();
}
@Override
public int getPort(UriInfo originalUriInfo) {
return originalUriInfo.getRequestUri().getPort();
}
}