2018-07-30 20:38:43 +00:00
|
|
|
package org.keycloak.url;
|
|
|
|
|
|
|
|
import org.keycloak.urls.HostnameProvider;
|
|
|
|
|
|
|
|
import javax.ws.rs.core.UriInfo;
|
|
|
|
|
2019-10-16 08:33:55 +00:00
|
|
|
@Deprecated
|
2018-07-30 20:38:43 +00:00
|
|
|
public class RequestHostnameProvider implements HostnameProvider {
|
|
|
|
|
2018-10-04 10:05:44 +00:00
|
|
|
@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();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|