Skip to content

feat: Add Constructors to Allow Import of External Tokens#30

Merged
isac322 merged 3 commits intoisac322:masterfrom
datadistillr:add_constructors
Dec 25, 2022
Merged

feat: Add Constructors to Allow Import of External Tokens#30
isac322 merged 3 commits intoisac322:masterfrom
datadistillr:add_constructors

Conversation

@cgivre
Copy link
Contributor

@cgivre cgivre commented Dec 21, 2022

This PR adds the ability to create a OneDrive client if the access and refresh tokens are obtained elsewhere.

String clientID = "<your client id>";
String clientSecret = "<your client secret>";
String accessToken = "<access_token>";
String refreshToken = "<refresh_token>"
String tokenType = "bearer";
String[] scope = {"files.readwrite.all", "offline_access"};
String redirectURL = "http://localhost:8080/";
long expiresIn = 0;

Client client = new Client(clientID, scope, redirectURL, clientSecret, accessToken, refreshToken, tokenType, expiresIn);

@cgivre cgivre changed the title Added Constructors to Allow Import of External Tokens Add Constructors to Allow Import of External Tokens Dec 21, 2022
@cgivre cgivre changed the title Add Constructors to Allow Import of External Tokens feat: Add Constructors to Allow Import of External Tokens Dec 21, 2022
@isac322 isac322 merged commit 1b4637c into isac322:master Dec 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants