Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

import static io.netty.handler.codec.http.HttpHeaderNames.AUTHORIZATION;

import io.netty.handler.codec.http.HttpHeaderNames;
import io.netty.handler.codec.http.HttpHeaderValues;
import io.netty.handler.codec.http.HttpHeaders;
import io.netty.util.AsciiString;
import java.util.Map;
Expand Down Expand Up @@ -99,7 +101,12 @@ public Mono<String> authorizationCodeGrantBrowser(
builder ->
builder.pathSegment("oauth", "authorize")
.queryParam("response_type", ResponseType.CODE),
outbound -> {},
outbound -> {
outbound.remove(HttpHeaderNames.ACCEPT);
outbound.add(
HttpHeaderNames.ACCEPT,
HttpHeaderValues.APPLICATION_X_WWW_FORM_URLENCODED);
},
ReactorAuthorizations::removeAuthorization)
.map(inbound -> inbound.responseHeaders().get(LOCATION))
.checkpoint();
Expand All @@ -114,7 +121,12 @@ public Mono<String> authorizationCodeGrantHybrid(
builder.pathSegment("oauth", "authorize")
.queryParam(
"response_type", ResponseType.CODE_AND_ID_TOKEN),
outbound -> {},
outbound -> {
outbound.remove(HttpHeaderNames.ACCEPT);
outbound.add(
HttpHeaderNames.ACCEPT,
HttpHeaderValues.APPLICATION_X_WWW_FORM_URLENCODED);
},
ReactorAuthorizations::removeAuthorization)
.map(inbound -> inbound.responseHeaders().get(LOCATION))
.checkpoint();
Expand All @@ -126,7 +138,8 @@ public Mono<GetOpenIdProviderConfigurationResponse> getOpenIdProviderConfigurati
return get(
request,
GetOpenIdProviderConfigurationResponse.class,
builder -> builder.pathSegment(".well-known", "openid-configuration"))
builder -> builder.pathSegment(".well-known", "openid-configuration"),
ReactorAuthorizations::removeAuthorization)
.checkpoint();
}

Expand All @@ -137,7 +150,12 @@ public Mono<String> implicitGrantBrowser(AuthorizeByImplicitGrantBrowserRequest
builder ->
builder.pathSegment("oauth", "authorize")
.queryParam("response_type", ResponseType.TOKEN),
outbound -> {},
outbound -> {
outbound.remove(HttpHeaderNames.ACCEPT);
outbound.add(
HttpHeaderNames.ACCEPT,
HttpHeaderValues.APPLICATION_X_WWW_FORM_URLENCODED);
},
ReactorAuthorizations::removeAuthorization)
.map(inbound -> inbound.responseHeaders().get(LOCATION))
.checkpoint();
Expand All @@ -152,7 +170,12 @@ public Mono<String> openIdWithAuthorizationCodeAndIdToken(
builder.pathSegment("oauth", "authorize")
.queryParam(
"response_type", ResponseType.CODE_AND_ID_TOKEN),
outbound -> {},
outbound -> {
outbound.remove(HttpHeaderNames.ACCEPT);
outbound.add(
HttpHeaderNames.ACCEPT,
HttpHeaderValues.APPLICATION_X_WWW_FORM_URLENCODED);
},
ReactorAuthorizations::removeAuthorization)
.map(inbound -> inbound.responseHeaders().get(LOCATION))
.checkpoint();
Expand All @@ -164,7 +187,14 @@ public Mono<String> openIdWithIdToken(AuthorizeByOpenIdWithIdTokenRequest reques
request,
builder ->
builder.pathSegment("oauth", "authorize")
.queryParam("response_type", ResponseType.ID_TOKEN))
.queryParam("response_type", ResponseType.ID_TOKEN),
outbound -> {
outbound.remove(HttpHeaderNames.ACCEPT);
outbound.add(
HttpHeaderNames.ACCEPT,
HttpHeaderValues.APPLICATION_X_WWW_FORM_URLENCODED);
},
ReactorAuthorizations::removeAuthorization)
.map(inbound -> inbound.responseHeaders().get(LOCATION))
.checkpoint();
}
Expand All @@ -177,7 +207,13 @@ public Mono<String> openIdWithTokenAndIdToken(
builder ->
builder.pathSegment("oauth", "authorize")
.queryParam(
"response_type", ResponseType.TOKEN_AND_ID_TOKEN))
"response_type", ResponseType.TOKEN_AND_ID_TOKEN),
outbound -> {
outbound.remove(HttpHeaderNames.ACCEPT);
outbound.add(
HttpHeaderNames.ACCEPT,
HttpHeaderValues.APPLICATION_X_WWW_FORM_URLENCODED);
})
.map(inbound -> inbound.responseHeaders().get(LOCATION))
.checkpoint();
}
Expand Down
Loading