-
Notifications
You must be signed in to change notification settings - Fork 3
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
FR-18338.3 #86
base: master
Are you sure you want to change the base?
FR-18338.3 #86
Conversation
@frontegg-david I've added comments to main classes please check. |
@alex-minaiev-frontegg could you please fix conflicts first? |
# Conflicts: # android/src/main/java/com/frontegg/android/AuthenticationActivity.kt # android/src/main/java/com/frontegg/android/FronteggAuth.kt # android/src/main/java/com/frontegg/android/embedded/FronteggWebClient.kt # android/src/main/java/com/frontegg/android/embedded/FronteggWebView.kt # android/src/main/java/com/frontegg/android/services/RefreshTokenJobService.kt
* @property observable is the Subject of NullableObject; | ||
* @property value is the read only value of [ReadOnlyObservableValue]; | ||
*/ | ||
abstract class ReadOnlyObservableValue<T>(value: T) { |
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.
abstraction layer introduces additional complexity without providing clear advantages for most use cases
} | ||
} | ||
|
||
fun scheduleTimer(offset: Long) { |
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.
add check if the token is already expired before scheduling
This PR was founded on https://frontegg.atlassian.net/browse/FR-18338 point 3
Created
FronteggApp
andFronteggAuth
interfaces for separation interface and realization and provided to customers only necessary methods and properties to avoid accessing the inner implementation of methods and properties.New Component:
FronteggAppService
- implementation ofFronteggApp
interface.FronteggInnerStorage
- store all necessary information about SDK running (baseUrl, clientId, applicationId, etc.). Created to avoid usingFronteggApp
andFronteggAppService
by SDK components.FronteggAuthService
- implementation ofFronteggAuth
interface.FronteggAppLifecycle
- separate object for listening to application Lifecycle Events. Created to encapsulate all data and methods responsible forAppLifecycle
(encapsulation Principle of OOP).FronteggRefreshTokenTimer
- separate object for managing RefreshTokenTimer. Created to encapsulate all data and methods responsible forRefreshTokenTimer
(encapsulation Principle of OOP).RefreshTokenService
withRefreshTokenJobService
- to avoid confusion with SDK Services.ReadOnlyObservableValue
- usingObservableValue
customer could change thevalue
ofObservableValue
.ReadOnlyObservableValue
lockset
ability ofvalue
.