-
Notifications
You must be signed in to change notification settings - Fork 31
Conversation
@TommyJ1994 Would you mind taking a look? Still a bit more work to be done, just sanity checking the current work |
Looks good so far 👍 |
@TommyJ1994 Only coming back to this now. I'm not sure the value testing would add here as we're wrapping AppAuth very closely. Is there anything else this check needs to do? @ziccardi Would you mind taking a look also? |
@aidenkeating Agreed, its a light wrapper so I think we can do without tests. |
The only comment I have about this, is about adding the get/set methods and the isAuthorized method. |
@ziccardi Just to confirm, you mean changing UserPrincipalImpl to use OIDCCredential instead of the generic ICredential? https://github.com/aidenkeating/aerogear-android-sdk/blob/a63f7db58971b61d6fd55d8a9ad1ae482db9a9da/auth/src/main/java/org/aerogear/auth/impl/UserPrincipalImpl.java#L37 If so, that sounds good to me, will make that change Edit: Like this b0c8452 |
@aidenkeating No, I just mean moving those methods to the |
b0c8452
to
59f5faf
Compare
* @return <code>true</code> if user is authorized and token is not expired. | ||
*/ | ||
@Override | ||
public boolean checkValidAuth() { |
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.
I think it would be better to add this method to the credentials
object so that the UserPrincipalImpl
remains general purpose. WDYT?
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.
Ah I understand what you mean now, yep that makes sense to me
59f5faf
to
a63f7db
Compare
@ziccardi Would you mind taking another look? Moved |
@ziccardi Mind taking another look? |
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.
LGTM
Motivation
Allow checking for current auth status. Both is authorized and token isn't expired.
JIRA: https://issues.jboss.org/browse/AGDROID-682
Description
Wraps AuthState some more with OIDCCredentials, mainly wrapping
isAuthorized()
andgetNeedsTokenRefresh()
.Check these to determine the current auth state using
checkAuthState()
.Progress