Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #19 from BEAN-Tastic/oauthfix
Browse files Browse the repository at this point in the history
Oauthfix
  • Loading branch information
SamanthaVS-BBD authored Mar 14, 2024
2 parents 55edfad + 40bb230 commit ca35763
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/main/java/com/beantastic/oauth/GitHubOAuth.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,19 @@ public class GitHubOAuth {

public static String getAccessToken() throws IOException, InterruptedException {

String clientIdKey = "clientId";
String clientIdKey = "\"clientId\"";
Properties clientIdProperty = PropertiesLoader.loadProperties();

String clientId = clientIdProperty.getProperty(clientIdKey);
clientId = clientId.substring(clientId.indexOf('"') + 1,
clientId.lastIndexOf('"'));

String clientSecretKey = "clientSecret";
String clientSecretKey = "\"clientSecret\"";
Properties clientSecretProperty = PropertiesLoader.loadProperties();
String clientSecret = clientSecretProperty.getProperty(clientSecretKey);

clientSecret = clientSecret.substring(clientSecret.indexOf('"') + 1,
clientSecret.lastIndexOf('"'));

String authorizationEndpoint = "https://github.com/login/oauth/authorize";
String tokenEndpoint = "https://github.com/login/oauth/access_token";

Expand Down

0 comments on commit ca35763

Please sign in to comment.