Refactor BFF Package Structure #64
@ -8,7 +8,11 @@ import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
|
|||||||
|
|
||||||
public class BFFAuthenticationEntryPoint implements AuthenticationEntryPoint {
|
public class BFFAuthenticationEntryPoint implements AuthenticationEntryPoint {
|
||||||
@Override
|
@Override
|
||||||
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) {
|
public void commence(
|
||||||
|
HttpServletRequest request,
|
||||||
|
HttpServletResponse response,
|
||||||
|
AuthenticationException authException)
|
||||||
|
{
|
||||||
String loginUri = ServletUriComponentsBuilder.fromRequest(request)
|
String loginUri = ServletUriComponentsBuilder.fromRequest(request)
|
||||||
.replacePath("/oauth2/authorization/studentportalen")
|
.replacePath("/oauth2/authorization/studentportalen")
|
||||||
.build()
|
.build()
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
/// This package contains the classes and logic for handling the login process
|
/// This package contains the classes and logic for handling the login process
|
||||||
/// described in section 6.1 of [OAuth 2.0 for Browser-Based Applications](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-browser-based-apps#name-backend-for-frontend-bff).
|
/// described in section 6.1 of OAuth 2.0 for Browser-Based Applications.
|
||||||
|
/// See: https://datatracker.ietf.org/doc/html/draft-ietf-oauth-browser-based-apps
|
||||||
///
|
///
|
||||||
/// The frontend running in the browser will attempt to make a request to the
|
/// The frontend running in the browser will attempt to make a request to the
|
||||||
/// backend-for-frontend (BFF). If the client is not already authenticated (by
|
/// backend-for-frontend (BFF). If the client is not already authenticated (by
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user