Package com.seeq.link.sdk.interfaces
Class AuthResult
java.lang.Object
com.seeq.link.sdk.interfaces.AuthResult
The authentication result as communicated back by the connector
-
Method Summary
Modifier and TypeMethodDescriptionstatic AuthResult
Create anAuthResult
representing a failure to authenticate or authorize.static AuthResult
Create anAuthResult
representing the need to additional round-trips.static AuthResult
Create anAuthResult
representing a successful authentication.unauthorized
(@NonNull String errorMessage) Create anAuthResult
representing a failure to authorize, despite authenticating.static AuthResult
unauthorized
(@NonNull String errorMessage, @NonNull String userId, List<GroupInfo> groups) Create anAuthResult
representing a failure to authorize, despite authenticating.
-
Method Details
-
success
Create anAuthResult
representing a successful authentication.authenticated
will betrue
userId
will be non-null
errorMessage
will benull
continuation
will be non-null
- Parameters:
userId
- the user ID, which is connector-specific- Returns:
- a freshly constructed
AuthResult
which will result in valid credentials to use Seeq, unless laterunauthorized(String)
.
-
negotiate
Create anAuthResult
representing the need to additional round-trips.authenticated
will befalse
userId
will benull
errorMessage
will benull
continuation
will be non-null
See:com.seeq.link.connectors.windowsauth
- Parameters:
continuationToken
- the continuation token- Returns:
- a freshly constructed
AuthResult
which must undergo negotiation before (possibly) continuing to authenticate.
-
failed
Create anAuthResult
representing a failure to authenticate or authorize.- Parameters:
errorMessage
- the error message indicating what failed.- Returns:
- a freshly constructed
AuthResult
which will not result in valid credentials to use Seeq.
-
unauthorized
public static AuthResult unauthorized(@NonNull @NonNull String errorMessage, @NonNull @NonNull String userId, @Nullable List<GroupInfo> groups) Create anAuthResult
representing a failure to authorize, despite authenticating. The additional parameters allow the system to perform group sync.- Parameters:
errorMessage
- the error message indicating why the user is not able to use Seeq.userId
- the user IDgroups
- the groups to sync, if any- Returns:
- a freshly constructed
AuthResult
which will not result in valid credentials to use Seeq.
-
unauthorized
Create anAuthResult
representing a failure to authorize, despite authenticating. All additional data (name, groups, etc.) will be copied fromthis
instance.- Parameters:
errorMessage
- the error message indicating why the user is not able to use Seeq.- Returns:
- a freshly constructed
AuthResult
which will not result in valid credentials to use Seeq, yet which carries a copy of all of the user information present onthis
instance.
-