Class BaseAuthenticationProvider
java.lang.Object
com.microsoft.graph.authentication.BaseAuthenticationProvider
- All Implemented Interfaces:
IAuthenticationProvider
- Direct Known Subclasses:
TokenCredentialAuthProvider
Provides basic common methods for all authentication providers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]Get the custom hosts set by user.voidsetCustomHosts(String[] customHosts) Allow the user to add custom hosts by passing in Arrayprotected booleanshouldAuthenticateRequestWithUrl(URL requestUrl) Determines whether a request should be authenticated or not based on it's url.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.microsoft.graph.authentication.IAuthenticationProvider
getAuthorizationTokenAsync
-
Constructor Details
-
BaseAuthenticationProvider
public BaseAuthenticationProvider()
-
-
Method Details
-
setCustomHosts
Allow the user to add custom hosts by passing in Array- Parameters:
customHosts- custom hosts passed in by user.
-
getCustomHosts
Get the custom hosts set by user.- Returns:
- the custom hosts set by user.
-
shouldAuthenticateRequestWithUrl
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
-