Class AuthResult

java.lang.Object
com.seeq.link.sdk.interfaces.AuthResult

public class AuthResult extends Object
The authentication result as communicated back by the connector
  • Method Details

    • success

      public static AuthResult success(@NonNull @NonNull String userId)
      Create an AuthResult representing a successful authentication.
      • authenticated will be true
      • userId will be non-null
      • errorMessage will be null
      • 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 later unauthorized(String).
    • negotiate

      public static AuthResult negotiate(@NonNull @NonNull String continuationToken)
      Create an AuthResult representing the need to additional round-trips.
      • authenticated will be false
      • userId will be null
      • errorMessage will be null
      • 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

      public static AuthResult failed(@NonNull @NonNull String errorMessage)
      Create an AuthResult 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 an AuthResult 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 ID
      groups - the groups to sync, if any
      Returns:
      a freshly constructed AuthResult which will not result in valid credentials to use Seeq.
    • unauthorized

      public AuthResult unauthorized(@NonNull @NonNull String errorMessage)
      Create an AuthResult representing a failure to authorize, despite authenticating. All additional data (name, groups, etc.) will be copied from this 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 on this instance.