-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Pre-Authenticated URL #193
Conversation
Finished renaming. |
sdk/src/main/java/com/oursky/authgear/PersistentSharedStorage.kt
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,12 @@ | |||
package com.oursky.authgear | |||
|
|||
sealed class AppInitiatedSSOToWebNotAllowedException : AuthgearException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not use sealed class in public API. I do not know how is it translated to Java. Just use normal class hierarchy to represent these exceptions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://medium.com/asos-techblog/kotlin-classes-in-java-world-365323843e6e
It will be something like
abstract class PreAuthenticatedURLNotAllowedException {
static final class InsufficientScopeException extends PreAuthenticatedURLNotAllowedException {
}
static final class IDTokenNotFoundException extends PreAuthenticatedURLNotAllowedException {
}
static final class DeviceSecretNotFoundException extends PreAuthenticatedURLNotAllowedException {
}
}
I've added a commit to ensure it can be imported in java.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But exception as a inner class in uncommon. I still prefer we use regular classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@louischan-oursky Added a commit to change it to regular classes.
@tung2744 Please ping me when this PR is ready for review again. |
@louischan-oursky Updated, thanks! |
ref DEV-1407
Test steps are same as authgear/authgear-sdk-js#306