Skip to content

Commit

Permalink
Merge pull request #16 from GSM-MSG/15-update-server-url
Browse files Browse the repository at this point in the history
update :: Update Server URL
  • Loading branch information
enbraining authored Oct 19, 2024
2 parents 3bee680 + 7e15c98 commit 49be15b
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions src/main/java/gauth/impl/GAuthImpl.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
package gauth.impl;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import gauth.GAuth;
import gauth.enums.TokenType;
import gauth.response.GAuthCode;
import gauth.response.GAuthToken;
import gauth.response.GAuthUserInfo;
import gauth.exception.GAuthException;
import gauth.exception.InvalidEncodingException;
import gauth.exception.JsonNotParseException;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.Map;

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPatch;
Expand All @@ -19,14 +16,22 @@
import org.apache.http.impl.client.HttpClientBuilder;
import org.json.simple.JSONObject;

import java.io.*;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

import gauth.GAuth;
import gauth.enums.TokenType;
import gauth.exception.GAuthException;
import gauth.exception.InvalidEncodingException;
import gauth.exception.JsonNotParseException;
import gauth.response.GAuthCode;
import gauth.response.GAuthToken;
import gauth.response.GAuthUserInfo;

public class GAuthImpl implements GAuth {
private final ObjectMapper mapper = new ObjectMapper();
private final String GAuthServerURL = "https://port-0-gauth-backend-85phb42bluutn9a7.sel5.cloudtype.app/oauth";
private final String ResourceServerURL = "https://port-0-gauth-resource-server-71t02clq411q18.sel4.cloudtype.app";
private final String GAuthServerURL = "https://server-gauth.msg-team.com/oauth";
private final String ResourceServerURL = "https://resource-gauth.msg-team.com";

public GAuthToken generateToken(String email, String password, String clientId, String clientSecret, String redirectUri) {
String code = generateCode(email, password).getCode();
Expand Down Expand Up @@ -184,4 +189,4 @@ private Map<String, String> sendPost(Map<String, String> body, String token, Str



}
}

0 comments on commit 49be15b

Please sign in to comment.