Skip to content

Commit 2fd92f6

Browse files
author
Nakul Sabharwal
committed
Changed IAuthenticationProvider to ICoreAuthenticationProvider
1 parent 339089f commit 2fd92f6

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/main/java/com/microsoft/graph/httpcore/AuthenticationHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ public class AuthenticationHandler implements Interceptor {
1212

1313
public final MiddlewareType MIDDLEWARE_TYPE = MiddlewareType.AUTHENTICATION;
1414

15-
private IAuthenticationProvider authProvider;
15+
private ICoreAuthenticationProvider authProvider;
1616

17-
public AuthenticationHandler(IAuthenticationProvider authProvider) {
17+
public AuthenticationHandler(ICoreAuthenticationProvider authProvider) {
1818
this.authProvider = authProvider;
1919
}
2020

src/main/java/com/microsoft/graph/httpcore/HttpClients.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static Builder custom() {
2525
* @param auth Use IAuthenticationProvider instance provided while constructing http client
2626
* @return OkHttpClient build with authentication provider given, default redirect and default retry handlers
2727
*/
28-
public static OkHttpClient createDefault(IAuthenticationProvider auth) {
28+
public static OkHttpClient createDefault(ICoreAuthenticationProvider auth) {
2929
return new OkHttpClient.Builder().addInterceptor(new AuthenticationHandler(auth))
3030
.followRedirects(false)
3131
.addInterceptor(new RetryHandler())

src/main/java/com/microsoft/graph/httpcore/IAuthenticationProvider.java renamed to src/main/java/com/microsoft/graph/httpcore/ICoreAuthenticationProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import okhttp3.Request;
44

5-
public interface IAuthenticationProvider {
5+
public interface ICoreAuthenticationProvider {
66
/**
77
* Authenticates the request
88
*

src/test/java/com/microsoft/graph/httpcore/AuthenticationHandlerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class AuthenticationHandlerTest {
1414

1515
static String token = "TEST-TOKEN";
1616

17-
public static class AuthProvider implements IAuthenticationProvider{
17+
public static class AuthProvider implements ICoreAuthenticationProvider{
1818
public Request authenticateRequest(Request request) {
1919
Request newRequest = request.newBuilder().addHeader("Authorization", "Bearer " + token).build();
2020
return newRequest;

src/test/java/com/microsoft/graph/httpcore/HttpClientsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class HttpClientsTest {
1111

1212
@Test
1313
public void testHttpClientCreation() {
14-
IAuthenticationProvider authprovider = new IAuthenticationProvider() {
14+
ICoreAuthenticationProvider authprovider = new ICoreAuthenticationProvider() {
1515
public Request authenticateRequest(Request request) {
1616
Request newRequest = request.newBuilder().addHeader("Authorization", "Bearer " + "TOKEN").build();
1717
return newRequest;

0 commit comments

Comments
 (0)