MicrosoftAppCredentials Class

public class MicrosoftAppCredentials
extends AppCredentials

MicrosoftAppCredentials auth implementation and cache.

Field Summary

Modifier and Type Field and Description
static final java.lang.String MICROSOFTAPPID

The configuration property for the Microsoft app Password.

static final java.lang.String MICROSOFTAPPPASSWORD

The configuration property for the Microsoft app ID.

Constructor Summary

Constructor Description
MicrosoftAppCredentials(String withAppId, String withAppPassword)

Initializes a new instance of the MicrosoftAppCredentials class.

MicrosoftAppCredentials(String withAppId, String withAppPassword, String withChannelAuthTenant)

Initializes a new instance of the MicrosoftAppCredentials class.

MicrosoftAppCredentials(String withAppId, String withAppPassword, String withChannelAuthTenant, String withOAuthScope)

Initializes a new instance of the MicrosoftAppCredentials class.

Method Summary

Modifier and Type Method and Description
protected Authenticator buildAuthenticator()

Returns an credentials Authenticator.

static MicrosoftAppCredentials empty()

Returns an empty set of credentials.

java.lang.String getAppPassword()

Gets the app password for this credential.

void setAppPassword(String withAppPassword)

Sets the app password for this credential.

Methods inherited from AppCredentials

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Field Details

MICROSOFTAPPID

public static final String MICROSOFTAPPID

The configuration property for the Microsoft app Password.

MICROSOFTAPPPASSWORD

public static final String MICROSOFTAPPPASSWORD

The configuration property for the Microsoft app ID.

Constructor Details

MicrosoftAppCredentials

public MicrosoftAppCredentials(String withAppId, String withAppPassword)

Initializes a new instance of the MicrosoftAppCredentials class.

Parameters:

withAppId - The Microsoft app ID.
withAppPassword - The Microsoft app password.

MicrosoftAppCredentials

public MicrosoftAppCredentials(String withAppId, String withAppPassword, String withChannelAuthTenant)

Initializes a new instance of the MicrosoftAppCredentials class.

Parameters:

withAppId - The Microsoft app ID.
withAppPassword - The Microsoft app password.
withChannelAuthTenant - Optional. The oauth token tenant.

MicrosoftAppCredentials

public MicrosoftAppCredentials(String withAppId, String withAppPassword, String withChannelAuthTenant, String withOAuthScope)

Initializes a new instance of the MicrosoftAppCredentials class.

Parameters:

withAppId - The Microsoft app ID.
withAppPassword - The Microsoft app password.
withChannelAuthTenant - Optional. The oauth token tenant.
withOAuthScope - The scope for the token.

Method Details

buildAuthenticator

protected Authenticator buildAuthenticator()

Returns an credentials Authenticator.

Overrides:

MicrosoftAppCredentials.buildAuthenticator()

Returns:

A CredentialsAuthenticator.

Throws:

java.net.MalformedURLException - Invalid endpoint url.

empty

public static MicrosoftAppCredentials empty()

Returns an empty set of credentials.

Returns:

A empty set of MicrosoftAppCredentials.

getAppPassword

public String getAppPassword()

Gets the app password for this credential.

Returns:

The app password.

setAppPassword

public void setAppPassword(String withAppPassword)

Sets the app password for this credential.

Parameters:

withAppPassword - The app password.

Applies to