protected boolean needsToLoadCredentials ( ) { if ( credentials == null ) return true ; if ( credentialsExpiration != null ) { if ( isWithinExpirationThreshold ( ) ) return true ; } if ( lastInstanceProfileCheck != null ) { if ( isPastRefreshThreshold ( ) ) return true ; } return false ; }
Returns true if credentials are null credentials are within expiration or if the last attempt to refresh credentials is beyond the refresh threshold .