<%@ page contentType="text/html; charset=windows-31j"%> <%@ page import="org.json.JSONObject" %> <%@ page import="org.json.JSONException" %> <% String clientId = request.getParameter("client_id"); String redirectUri = request.getParameter("redirect_uri"); String responseType = request.getParameter("response_type"); String bail = request.getParameter("bail"); String scope = request.getParameter("scope"); String state = request.getParameter("state"); String nonce = request.getParameter("nonce"); String display = request.getParameter("display"); String prompt = request.getParameter("prompt"); String maxAge = request.getParameter("max_age"); String accessType = request.getParameter("access_type"); String hd = request.getParameter("hd"); String includeGrantedScopes = request.getParameter("include_granted_scopes"); String loginHint = request.getParameter("login_hint"); String responseMode = request.getParameter("response_mode"); String kbn = ""; JSONObject appleObject = new JSONObject(); JSONObject appleidObject = new JSONObject(); if(clientId.contains("GOOGLE") || clientId.contains("1003769101582-bhts1o2pct9mhicnu3n70chfj2246jpk.apps.googleusercontent.com")) { kbn = "G"; } else if(clientId.contains("YAHOO") || clientId.contains("dj00aiZpPUJkdWtTcXljaHRBRiZzPWNvbnN1bWVyc2VjcmV0Jng9Y2E-")) { kbn = "Y"; } else if(clientId.contains("FACEBOOK") || clientId.contains("211017217111795")) { kbn = "F"; } else if(clientId.contains("APPLE") || clientId.contains("jp.eonet.test-order.app")) { kbn = "A"; try { JSONObject nameObject = new JSONObject(); nameObject.put("firstName", "Apple"); nameObject.put("lastName", "井尾"); appleObject.put("name", nameObject); appleObject.put("email", "send01_fu01@zeus.eonet.ne.jp"); appleidObject.put("sub", "SUB1234567890APPLE"); } catch (JSONException e) { //e.printStackTrace(); System.out.println(e.toString()); } } %> 【ソーシャルID】認証スタブ画面

【ソーシャルID】認証スタブ画面

・ラベル項目:リクエスト項目の値を表示
・INPUT項目:レスポンス項目の値を表示

<% if("G".equals(kbn)){ %> <% // ---------- Google ---------- %>

項目名項目ID
クライアントIDclient_id<%=clientId%>
リダイレクトURIredirect_uri<%=redirectUri%>
レスポンスタイプresponse_type<%=responseType%>
スコープscope<%=scope%>
ナンスnonce<%=nonce%>
アクセスタイプaccess_type<%=accessType%>
ディスプレイdisplay<%=display%>
プロンプトprompt<%=prompt%>
ホストドメインhd<%=hd%>
増分スコープ許可include_granted_scopes<%=includeGrantedScopes%>
ログインヒントlogin_hint<%=loginHint%>
ステートstate
認可コードcode
<% } %> <% if("Y".equals(kbn)){ %> <% // ---------- Yahoo ---------- %>

項目名項目ID
クライアントIDclient_id<%=clientId%>
リダイレクトURIredirect_uri<%=redirectUri%>
レスポンスタイプresponse_type<%=responseType%>
バイルbail<%=bail%>
スコープscope<%=scope%>
ナンスnonce<%=nonce%>
ディスプレイdisplay<%=display%>
プロンプトprompt<%=prompt%>
最大認証経過時間max_age<%=maxAge%>
ステートstate
認可コードcode
<% } %> <% if("F".equals(kbn)){ %> <% // ---------- Facebook ---------- %>

項目名項目ID
クライアントIDclient_id<%=clientId%>
リダイレクトURIredirect_uri<%=redirectUri%>
レスポンスタイプresponse_type<%=responseType%>
スコープscope<%=scope%>
ステートstate
認可コードcode
<% } %> <% if("A".equals(kbn)){ %> <% // ---------- Apple ---------- %>

項目名項目ID
クライアントIDclient_id<%=clientId%>
リダイレクトURIredirect_uri<%=redirectUri%>
レスポンスタイプresponse_type<%=responseType%>
レスポンスモードresponse_mode<%=responseMode%>
スコープscope<%=scope%>
ナンスnonce<%=nonce%>
ステートstate
認可コードcode
IDトークンid_token
ユーザーuser
<% } %>