Class CumulocityCredentialsFactory

java.lang.Object
com.cumulocity.model.authentication.CumulocityCredentialsFactory

public class CumulocityCredentialsFactory extends Object
Used to create CumulocityCredentials objects, if given accessToken and xsrfToken, then CumulocityOAuthCredentials is created else CumulocityBasicCredentials is created
  • Constructor Details

    • CumulocityCredentialsFactory

      public CumulocityCredentialsFactory()
    • CumulocityCredentialsFactory

      public CumulocityCredentialsFactory(String tenant, String username, String password, String oAuthAccessToken, String xsrfToken, String applicationKey, String requestOrigin, AuthenticationMethod authenticationMethod)
  • Method Details

    • getCredentials

      public CumulocityCredentials getCredentials()
    • withTenant

      public CumulocityCredentialsFactory withTenant(String tenant)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withUsername

      public CumulocityCredentialsFactory withUsername(String username)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withPassword

      public CumulocityCredentialsFactory withPassword(String password)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withOAuthAccessToken

      public CumulocityCredentialsFactory withOAuthAccessToken(String oAuthAccessToken)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withXsrfToken

      public CumulocityCredentialsFactory withXsrfToken(String xsrfToken)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withApplicationKey

      public CumulocityCredentialsFactory withApplicationKey(String applicationKey)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withRequestOrigin

      public CumulocityCredentialsFactory withRequestOrigin(String requestOrigin)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withAuthenticationMethod

      public CumulocityCredentialsFactory withAuthenticationMethod(AuthenticationMethod authenticationMethod)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).