Refactor BFF Package Structure #64

Merged
stne3960 merged 12 commits from refactor/bff-structure into main 2026-01-12 17:38:55 +01:00
2 changed files with 7 additions and 2 deletions
Showing only changes of commit 58fe9b07d0 - Show all commits

View File

@ -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()

View File

@ -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