BaseAuthenticationProvider Class

  • java.lang.Object
    • com.microsoft.graph.authentication.BaseAuthenticationProvider

Implements

public abstract class BaseAuthenticationProvider
implements IAuthenticationProvider

Provides basic common methods for all authentication providers

Constructor Summary

Constructor Description
BaseAuthenticationProvider()

Method Summary

Modifier and Type Method and Description
java.lang.String[] getCustomHosts()

Get the custom hosts set by user.

void setCustomHosts(String[] customHosts)

Allow the user to add custom hosts by passing in Array

protected boolean shouldAuthenticateRequestWithUrl(URL requestUrl)

Determines whether a request should be authenticated or not based on it's url.

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

Constructor Details

BaseAuthenticationProvider

public BaseAuthenticationProvider()

Method Details

getCustomHosts

public String[] getCustomHosts()

Get the custom hosts set by user.

Returns:

the custom hosts set by user.

setCustomHosts

public void setCustomHosts(String[] customHosts)

Allow the user to add custom hosts by passing in Array

Parameters:

customHosts - custom hosts passed in by user.

shouldAuthenticateRequestWithUrl

protected boolean shouldAuthenticateRequestWithUrl(URL requestUrl)

Determines whether a request should be authenticated or not based on it's url. If you're implementing a custom provider, call that method first before getting the token

Parameters:

requestUrl - request URL that is about to be executed

Returns:

whether a token should be attached to this request

Applies to