@@ -126,79 +126,6 @@ public Type getType() {
126126 return type ;
127127 }
128128
129- public JsonNode v0TokenGenerate (String type , String identity ) throws Exception {
130- String response = HttpClient .get (getBaseUrl () + "/token/generate?" + type + "=" + URLEncoder .encode (identity , StandardCharsets .UTF_8 ), CLIENT_API_KEY );
131- return Mapper .OBJECT_MAPPER .readTree (response );
132- }
133-
134- public JsonNode v0TokenRefresh (String token ) throws Exception {
135- String response = HttpClient .get (getBaseUrl () + "/token/refresh?refresh_token=" + URLEncoder .encode (token , StandardCharsets .UTF_8 ), CLIENT_API_KEY );
136- return Mapper .OBJECT_MAPPER .readTree (response );
137- }
138-
139- public JsonNode v0CheckedTokenRefresh (String token ) {
140- try {
141- return v0TokenRefresh (token );
142- } catch (Exception e ) {
143- return Mapper .OBJECT_MAPPER .createObjectNode ();
144- }
145- }
146-
147- public JsonNode v0TokenValidate (String type , String identity , String advertisingToken ) throws Exception {
148- String response = HttpClient .get (getBaseUrl () + "/token/validate?" + type + "=" + URLEncoder .encode (identity , StandardCharsets .UTF_8 ) + "&token=" + URLEncoder .encode (advertisingToken , StandardCharsets .UTF_8 ), CLIENT_API_KEY );
149- return Mapper .OBJECT_MAPPER .readTree (response );
150- }
151-
152- public String v0TokenLogout (String type , String identity ) throws Exception {
153- return HttpClient .get (getBaseUrl () + "/token/logout?" + type + "=" + URLEncoder .encode (identity , StandardCharsets .UTF_8 ), CLIENT_API_KEY );
154- }
155-
156- public String v0IdentityMap (String type , String identity ) throws Exception {
157- return HttpClient .get (getBaseUrl () + "/identity/map?" + type + "=" + URLEncoder .encode (identity , StandardCharsets .UTF_8 ), CLIENT_API_KEY );
158- }
159-
160- public String v0StaticJsUid2Sdk () throws Exception {
161- return HttpClient .get (getBaseUrl () + "/static/js/uid2-sdk-2.0.0.js" , CLIENT_API_KEY );
162- }
163-
164- public JsonNode v1TokenGenerate (String type , String identity ) throws Exception {
165- String response = HttpClient .get (getBaseUrl () + "/v1/token/generate?" + type + "=" + URLEncoder .encode (identity , StandardCharsets .UTF_8 ), CLIENT_API_KEY );
166- return Mapper .OBJECT_MAPPER .readTree (response );
167- }
168-
169- public JsonNode v1TokenRefresh (String token ) throws Exception {
170- String response = HttpClient .get (getBaseUrl () + "/v1/token/refresh?refresh_token=" + URLEncoder .encode (token , StandardCharsets .UTF_8 ), CLIENT_API_KEY );
171- return Mapper .OBJECT_MAPPER .readTree (response );
172- }
173-
174- public JsonNode v1CheckedTokenRefresh (String token ) {
175- try {
176- return v1TokenRefresh (token );
177- } catch (Exception e ) {
178- return Mapper .OBJECT_MAPPER .createObjectNode ();
179- }
180- }
181-
182- public JsonNode v1TokenValidate (String type , String identity , String advertisingToken ) throws Exception {
183- String response = HttpClient .get (getBaseUrl () + "/v1/token/validate?" + type + "=" + URLEncoder .encode (identity , StandardCharsets .UTF_8 ) + "&token=" + URLEncoder .encode (advertisingToken , StandardCharsets .UTF_8 ), CLIENT_API_KEY );
184- return Mapper .OBJECT_MAPPER .readTree (response );
185- }
186-
187- public JsonNode v1IdentityMap (String type , String identity ) throws Exception {
188- String response = HttpClient .get (getBaseUrl () + "/v1/identity/map?" + type + "=" + URLEncoder .encode (identity , StandardCharsets .UTF_8 ), CLIENT_API_KEY );
189- return Mapper .OBJECT_MAPPER .readTree (response );
190- }
191-
192- public JsonNode v1IdentityMapBatch (String payload ) throws Exception {
193- String response = HttpClient .post (getBaseUrl () + "/v1/identity/map" , payload , CLIENT_API_KEY );
194- return Mapper .OBJECT_MAPPER .readTree (response );
195- }
196-
197- public JsonNode v1KeyLatest () throws Exception {
198- String response = HttpClient .get (getBaseUrl () + "/v1/key/latest" , CLIENT_API_KEY );
199- return Mapper .OBJECT_MAPPER .readTree (response );
200- }
201-
202129 public TokenGenerateResponse v2TokenGenerate (String type , String identity , boolean asOldParticipant ) {
203130 TokenGenerateInput token ;
204131
0 commit comments