Skip to content

Commit 4b25631

Browse files
committed
- updates samples to match new constructors
1 parent b9dbb18 commit 4b25631

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎samples/deviceCodeSample/src/main/java/deviceCodeFlowMain.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static void deviceCodeFlow() throws AuthenticationException {
3131
.challengeConsumer(challenge -> {System.out.println(challenge.getMessage());})
3232
.build();
3333

34-
final TokenCredentialAuthProvider tokenCredAuthProvider = new TokenCredentialAuthProvider(SCOPES, deviceCodeCred);
34+
final TokenCredentialAuthProvider tokenCredAuthProvider = new TokenCredentialAuthProvider(deviceCodeCred, SCOPES);
3535
final OkHttpClient httpClient = HttpClients.createDefault(tokenCredAuthProvider);
3636

3737
final Request request = new Request.Builder().url("https://graph.microsoft.com/v1.0/me/").build();

‎samples/interactiveBrowserSample/src/main/java/interactiveBrowserMain.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class interactiveBrowserMain {
1616
private final static String CLIENT_ID = "199e4de3-dd3b-4a51-b78a-86b801246e20";
1717

1818
//Set the scopes for your ms-graph request
19-
private final static List<String> SCOPES = Arrays.asList("User.ReadBasic.All");
19+
private final static List<String> SCOPES = Arrays.asList("User.ReadBasic.All");
2020

2121
public static void main(String args[]) throws Exception {
2222
interactiveBrowser();
@@ -29,7 +29,7 @@ private static void interactiveBrowser() throws AuthenticationException{
2929
.port(8765)
3030
.build();
3131

32-
final TokenCredentialAuthProvider tokenCredentialAuthProvider = new TokenCredentialAuthProvider(SCOPES, interactiveBrowserCredential);
32+
final TokenCredentialAuthProvider tokenCredentialAuthProvider = new TokenCredentialAuthProvider(interactiveBrowserCredential, SCOPES);
3333
final OkHttpClient httpClient = HttpClients.createDefault(tokenCredentialAuthProvider);
3434

3535
final Request request = new Request.Builder().url("https://graph.microsoft.com/v1.0/me/").build();

0 commit comments

Comments
 (0)