httpでFreelancer.comのWeb APIにログインしようとしていますが、認証を通過できません。それは私がプロンプトから実行できるjavaのデスクトップアプリケーションのため、何も想像していないが、私は傾きが許可応答を受け取って、プロセスの過去のステップ1を取得するようだ。OAuth 2.0 Freelancer.com APIのJavaでのHTTPによる認証
package project.monitor;
import java.io.IOException;
import org.jsoup.Connection;
import org.jsoup.Jsoup;
public class api {
public static void main(String[] args) throws IOException {
String authEndPoint = "https://accounts.freelancer.com/oauth/authorise";
String apiEndPoint = "https://freelancer.com/api";
String str = "https://accounts.freelancer.com/oauth/authorise?" + "response_type=code"
+ "&client_id=<647f4785-fe45-4182-b97a-f401e0b0d641>" + "&redirect_uri=<https://www.google.com/>"
+ "&scope=basic" + "&prompt=select_account%20consent&advanced_scopes=1%203";
String json = Jsoup.connect(str).ignoreContentType(true).execute().body();
System.out.println(json);
}
}
ドキュメント:
The first step is to redirect your user to the Freelancer.com Identity
authorise url. This redirect prompts the user to give your application
permission to access their protected resources. When a user grants
permission, they will be redirected to an endpoint on your server with an
authorization code to be used in the following steps
https://developers.freelancer.com/docs/authentication/generating-access-tokensはどのようにこれが行われていますか?私はどのように私のプログラムに認証コードをeclipseでリダイレクトするのですか?