Package swiss.trustbroker.oidc
Class OidcExceptionHelper
java.lang.Object
swiss.trustbroker.oidc.OidcExceptionHelper
Small parts copied from spring-security-oauth2-authorization-server:
org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthorizationCodeRequestAuthenticationValidator
Javadoc of original class:
An
AuthenticationProvider implementation for the OAuth 2.0 Authorization Request
used in the Authorization Code Grant.- Since:
- 0.1.2
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbuildLocationForAuthenticationException(jakarta.servlet.http.HttpServletRequest request, String errorUri, String errorBaseUri, String handler, Predicate<String> urlValidator) static StringbuildLocationForAuthenticationException(jakarta.servlet.http.HttpServletRequest request, org.springframework.security.core.AuthenticationException authException, String errorUri, String errorBaseUri, String handler, Predicate<String> urlValidator) static org.springframework.security.oauth2.core.OAuth2AuthenticationExceptioncreateOidcException(String errorCode, String message, String description) static List<org.springframework.security.saml2.core.Saml2Error> enrichResponseError(OidcProperties oidcProperties, org.opensaml.saml.saml2.core.Response response, Collection<org.springframework.security.saml2.core.Saml2Error> errors) static StringgetOidcErrorLocation(String baseUri, String errorCode, String description, String errorUri, String errorBaseUri, String state) static booleanhasAuthenticationException(jakarta.servlet.http.HttpServletRequest request) static booleanisSpringErrorPage(String location) static voidsaveAuthenticationException(jakarta.servlet.http.HttpServletRequest request, org.springframework.security.core.AuthenticationException authException) static voidthrowError(String errorCode, String parameterName, org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthorizationCodeRequestAuthenticationToken authorizationCodeRequestAuthentication, org.springframework.security.oauth2.server.authorization.client.RegisteredClient registeredClient) static voidthrowError(org.springframework.security.oauth2.core.OAuth2Error error, String parameterName, org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthorizationCodeRequestAuthenticationToken authorizationCodeRequestAuthentication, org.springframework.security.oauth2.server.authorization.client.RegisteredClient registeredClient)
-
Field Details
-
ERROR_URI
- See Also:
-
ERROR_URI_PARAM
- See Also:
-
ERROR_DESCRIPTION_PARAM
- See Also:
-
-
Method Details
-
buildLocationForAuthenticationException
-
buildLocationForAuthenticationException
-
getOidcErrorLocation
-
saveAuthenticationException
public static void saveAuthenticationException(jakarta.servlet.http.HttpServletRequest request, org.springframework.security.core.AuthenticationException authException) -
hasAuthenticationException
public static boolean hasAuthenticationException(jakarta.servlet.http.HttpServletRequest request) -
throwError
public static void throwError(String errorCode, String parameterName, org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthorizationCodeRequestAuthenticationToken authorizationCodeRequestAuthentication, org.springframework.security.oauth2.server.authorization.client.RegisteredClient registeredClient) -
throwError
public static void throwError(org.springframework.security.oauth2.core.OAuth2Error error, String parameterName, org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthorizationCodeRequestAuthenticationToken authorizationCodeRequestAuthentication, org.springframework.security.oauth2.server.authorization.client.RegisteredClient registeredClient) -
enrichResponseError
public static List<org.springframework.security.saml2.core.Saml2Error> enrichResponseError(OidcProperties oidcProperties, org.opensaml.saml.saml2.core.Response response, Collection<org.springframework.security.saml2.core.Saml2Error> errors) -
isSpringErrorPage
-
createOidcException
-