Skip to content

Commit

Permalink
Logs
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalLike committed Oct 14, 2024
1 parent 27ad6b2 commit 64a8d89
Showing 1 changed file with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public LoggingOidcAuthorizationCodeAuthenticationProvider(
OAuth2UserService<OidcUserRequest, OidcUser> userService,
OIDCConfiguration oidcConfiguration) {
super(accessTokenResponseClient, userService);
Log.debug(Geonet.SECURITY,"---> DEBUG HOME MADE STUFF SUPER! " + accessTokenResponseClient.toString());
this.oidcConfiguration = oidcConfiguration;
}

Expand All @@ -83,24 +84,24 @@ public LoggingOidcAuthorizationCodeAuthenticationProvider(
*/
@Override
public Authentication authenticate(Authentication authentication) throws AuthenticationException {
Log.debug(Geonet.SECURITY,"---> DEBUG HOME MADE STUFF");
Log.debug(Geonet.SECURITY,"---> DEBUG HOME MADE STUFF ");
OAuth2LoginAuthenticationToken authorizationCodeAuthentication = (OAuth2LoginAuthenticationToken) authentication;
OAuth2AuthorizationRequest authorizationRequest = authorizationCodeAuthentication.getAuthorizationExchange()
.getAuthorizationRequest();
OAuth2AuthorizationResponse authorizationResponse = authorizationCodeAuthentication.getAuthorizationExchange()
.getAuthorizationResponse();


Log.debug(Geonet.SECURITY,"---> DEBUG HOME MADE STUFF" + authorizationCodeAuthentication.getClientRegistration());
Log.debug(Geonet.SECURITY,"---> DEBUG HOME MADE STUFF" + authorizationCodeAuthentication.getPrincipal());
Log.debug(Geonet.SECURITY,"---> DEBUG HOME MADE STUFF getClientRegistration " + authorizationCodeAuthentication.getClientRegistration());
Log.debug(Geonet.SECURITY,"---> DEBUG HOME MADE STUFF getPrincipal " + authorizationCodeAuthentication.getPrincipal());
if(authorizationCodeAuthentication.getAccessToken()!=null) {
Log.debug(Geonet.SECURITY,"---> DEBUG HOME MADE STUFF" + authorizationCodeAuthentication.getAccessToken().getTokenValue());
Log.debug(Geonet.SECURITY,"---> DEBUG HOME MADE STUFF" + authorizationCodeAuthentication.getAccessToken().getIssuedAt().toString());
Log.debug(Geonet.SECURITY,"---> DEBUG HOME MADE STUFF" + authorizationCodeAuthentication.getAccessToken().getExpiresAt().toString());
Log.debug(Geonet.SECURITY,"---> DEBUG HOME MADE STUFF " + authorizationCodeAuthentication.getAccessToken().getTokenValue());
Log.debug(Geonet.SECURITY,"---> DEBUG HOME MADE STUFF " + authorizationCodeAuthentication.getAccessToken().getIssuedAt().toString());
Log.debug(Geonet.SECURITY,"---> DEBUG HOME MADE STUFF " + authorizationCodeAuthentication.getAccessToken().getExpiresAt().toString());
}
Log.debug(Geonet.SECURITY,"---> DEBUG HOME MADE STUFF" + authorizationResponse.getRedirectUri());
Log.debug(Geonet.SECURITY,"---> DEBUG HOME MADE STUFF" + authorizationResponse.getState());
Log.debug(Geonet.SECURITY,"---> DEBUG HOME MADE STUFF" + authorizationResponse.getCode());
Log.debug(Geonet.SECURITY,"---> DEBUG HOME MADE STUFF getRedirectUri " + authorizationResponse.getRedirectUri());
Log.debug(Geonet.SECURITY,"---> DEBUG HOME MADE STUFF getState " + authorizationResponse.getState());
Log.debug(Geonet.SECURITY,"---> DEBUG HOME MADE STUFF getCode " + authorizationResponse.getCode());


Authentication result = super.authenticate(authentication);
Expand Down

0 comments on commit 64a8d89

Please sign in to comment.