Class CumulocityCredentialsFactory
java.lang.Object
com.cumulocity.model.authentication.CumulocityCredentialsFactory
Used to create CumulocityCredentials objects,
if given accessToken and xsrfToken,
then
CumulocityOAuthCredentials is created
else
CumulocityBasicCredentials is created-
Constructor Summary
ConstructorsConstructorDescriptionCumulocityCredentialsFactory(String tenant, String username, String password, String oAuthAccessToken, String xsrfToken, String applicationKey, String requestOrigin, AuthenticationMethod authenticationMethod) -
Method Summary
Modifier and TypeMethodDescriptionwithApplicationKey(String applicationKey) withAuthenticationMethod(AuthenticationMethod authenticationMethod) withOAuthAccessToken(String oAuthAccessToken) withPassword(String password) withRequestOrigin(String requestOrigin) withTenant(String tenant) withUsername(String username) withXsrfToken(String xsrfToken)
-
Constructor Details
-
CumulocityCredentialsFactory
public CumulocityCredentialsFactory() -
CumulocityCredentialsFactory
-
-
Method Details
-
getCredentials
-
withTenant
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withUsername
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withPassword
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withOAuthAccessToken
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withXsrfToken
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withApplicationKey
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withRequestOrigin
- 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).
-