🚧 Fix Callback
This commit is contained in:
parent
20d2b50cf0
commit
c93326b38f
@ -31,17 +31,23 @@ public class ProxyResource
|
|||||||
@Inject
|
@Inject
|
||||||
RouteService routeService;
|
RouteService routeService;
|
||||||
|
|
||||||
@Inject
|
|
||||||
CallbackService callbackService;
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
SessionRepository sessionRepository;
|
SessionRepository sessionRepository;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
ForwardService forwardService;
|
ForwardService forwardService;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
CallbackService callbackService;
|
||||||
|
|
||||||
|
@Route(path = "/callback", order = 0)
|
||||||
|
public void callback(@Context RoutingContext context)
|
||||||
|
{
|
||||||
|
callbackService.get(context.response(), context.request());
|
||||||
|
}
|
||||||
|
|
||||||
@Route(path = "/*", order = 1)
|
@Route(path = "/*", order = 1)
|
||||||
public void hello(@Context RoutingContext context)
|
public void proxy(@Context RoutingContext context)
|
||||||
{
|
{
|
||||||
List<String> requestSegments = List.of(context.request().path().split("/"));
|
List<String> requestSegments = List.of(context.request().path().split("/"));
|
||||||
|
|
||||||
|
|||||||
@ -24,8 +24,7 @@ public class CallbackService
|
|||||||
@ConfigProperty(name = "oidc.proxy.client.redirect")
|
@ConfigProperty(name = "oidc.proxy.client.redirect")
|
||||||
String redirectURI;
|
String redirectURI;
|
||||||
|
|
||||||
@Route(path = "/callback", order = 0)
|
public void get(HttpServerResponse response, HttpServerRequest request)
|
||||||
public void get(@Context HttpServerResponse response, @Context HttpServerRequest request)
|
|
||||||
{
|
{
|
||||||
String code = request.params().get("code");
|
String code = request.params().get("code");
|
||||||
TokenResponse token = client.exchangeAuthorizationCode(code);
|
TokenResponse token = client.exchangeAuthorizationCode(code);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user