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, thenCumulocityOAuthCredentials
is created elseCumulocityBasicCredentials
is 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 CumulocityCredentials
getCredentials()
CumulocityCredentialsFactory
withApplicationKey(String applicationKey)
CumulocityCredentialsFactory
withAuthenticationMethod(AuthenticationMethod authenticationMethod)
CumulocityCredentialsFactory
withOAuthAccessToken(String oAuthAccessToken)
CumulocityCredentialsFactory
withPassword(String password)
CumulocityCredentialsFactory
withRequestOrigin(String requestOrigin)
CumulocityCredentialsFactory
withTenant(String tenant)
CumulocityCredentialsFactory
withUsername(String username)
CumulocityCredentialsFactory
withXsrfToken(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
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).
-
-