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, thenCumulocityOAuthCredentialsis created elseCumulocityBasicCredentialsis created
-
-
Constructor Summary
Constructors Constructor Description CumulocityCredentialsFactory()CumulocityCredentialsFactory(String tenant, String username, String password, String oAuthAccessToken, String xsrfToken, String applicationKey, String requestOrigin, AuthenticationMethod authenticationMethod)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CumulocityCredentialsgetCredentials()CumulocityCredentialsFactorywithApplicationKey(String applicationKey)CumulocityCredentialsFactorywithAuthenticationMethod(AuthenticationMethod authenticationMethod)CumulocityCredentialsFactorywithOAuthAccessToken(String oAuthAccessToken)CumulocityCredentialsFactorywithPassword(String password)CumulocityCredentialsFactorywithRequestOrigin(String requestOrigin)CumulocityCredentialsFactorywithTenant(String tenant)CumulocityCredentialsFactorywithUsername(String username)CumulocityCredentialsFactorywithXsrfToken(String xsrfToken)
-
-
-
Method Detail
-
getCredentials
public CumulocityCredentials getCredentials()
-
withTenant
public CumulocityCredentialsFactory withTenant(String tenant)
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withUsername
public CumulocityCredentialsFactory withUsername(String username)
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withPassword
public CumulocityCredentialsFactory withPassword(String password)
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withOAuthAccessToken
public CumulocityCredentialsFactory withOAuthAccessToken(String oAuthAccessToken)
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withXsrfToken
public CumulocityCredentialsFactory withXsrfToken(String xsrfToken)
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withApplicationKey
public CumulocityCredentialsFactory withApplicationKey(String applicationKey)
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withRequestOrigin
public CumulocityCredentialsFactory withRequestOrigin(String requestOrigin)
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withAuthenticationMethod
public CumulocityCredentialsFactory withAuthenticationMethod(AuthenticationMethod authenticationMethod)
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
-