public boolean hasValidCredentials ( ) { String encryptedEncoded = storage . retrieveString ( KEY_CREDENTIALS ) ; Long expiresAt = storage . retrieveLong ( KEY_EXPIRES_AT ) ; Boolean canRefresh = storage . retrieveBoolean ( KEY_CAN_REFRESH ) ; return ! ( isEmpty ( encryptedEncoded ) || expiresAt == null || expiresAt <= getCurrentTimeInMillis ( ) && ( canRefresh == null || ! canRefresh ) ) ; }
Returns whether this manager contains a valid non - expired pair of credentials .