com.networknt.oauth.token.PathHandlerProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of oauth2-refresh-token Show documentation
Show all versions of oauth2-refresh-token Show documentation
A micro service server that manages refresh token.
package com.networknt.oauth.token;
import com.networknt.health.HealthGetHandler;
import com.networknt.info.ServerInfoGetHandler;
import com.networknt.oauth.token.handler.Oauth2RefreshTokenGetHandler;
import com.networknt.oauth.token.handler.Oauth2RefreshTokenRefreshTokenDeleteHandler;
import com.networknt.oauth.token.handler.Oauth2RefreshTokenRefreshTokenGetHandler;
import com.networknt.handler.HandlerProvider;
import io.undertow.Handlers;
import io.undertow.server.HttpHandler;
import io.undertow.util.Methods;
public class PathHandlerProvider implements HandlerProvider {
@Override
public HttpHandler getHandler() {
return Handlers.routing()
.add(Methods.GET, "/health", new HealthGetHandler())
.add(Methods.GET, "/server/info", new ServerInfoGetHandler())
.add(Methods.GET, "/oauth2/refresh_token", new Oauth2RefreshTokenGetHandler())
.add(Methods.DELETE, "/oauth2/refresh_token/{refreshToken}", new Oauth2RefreshTokenRefreshTokenDeleteHandler())
.add(Methods.GET, "/oauth2/refresh_token/{refreshToken}", new Oauth2RefreshTokenRefreshTokenGetHandler())
;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy