-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35216 from appsmithorg/cherry-pick/26-jul
Cherry pick/26 jul
- Loading branch information
Showing
5 changed files
with
80 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...r/src/main/java/com/appsmith/server/exceptions/AppsmithOAuth2AuthenticationException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.appsmith.server.exceptions; | ||
|
||
import lombok.Getter; | ||
import org.springframework.security.oauth2.core.OAuth2AuthenticationException; | ||
import org.springframework.security.oauth2.core.OAuth2Error; | ||
|
||
@Getter | ||
public class AppsmithOAuth2AuthenticationException extends OAuth2AuthenticationException { | ||
|
||
private final OAuth2Error error; | ||
/** | ||
* Constructs an {@code AppsmithOAuth2AuthenticationException} using the provided parameters. | ||
* @param error the {@link OAuth2Error OAuth 2.0 Error} | ||
*/ | ||
public AppsmithOAuth2AuthenticationException(OAuth2Error error) { | ||
this(error, error.getDescription(), null); | ||
} | ||
|
||
/** | ||
* Constructs an {@code AppsmithOAuth2AuthenticationException} using the provided parameters. | ||
* @param error the {@link OAuth2Error OAuth 2.0 Error} | ||
* @param message the detail message | ||
* @param cause the root cause | ||
*/ | ||
public AppsmithOAuth2AuthenticationException(OAuth2Error error, String message, Throwable cause) { | ||
super(error, message, cause); | ||
this.error = error; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters