JP6626466B2 - API providing apparatus and API use right transfer consent method - Google Patents

API providing apparatus and API use right transfer consent method Download PDF

Info

Publication number
JP6626466B2
JP6626466B2 JP2017027690A JP2017027690A JP6626466B2 JP 6626466 B2 JP6626466 B2 JP 6626466B2 JP 2017027690 A JP2017027690 A JP 2017027690A JP 2017027690 A JP2017027690 A JP 2017027690A JP 6626466 B2 JP6626466 B2 JP 6626466B2
Authority
JP
Japan
Prior art keywords
api
user
providing device
consent
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2017027690A
Other languages
Japanese (ja)
Other versions
JP2018133022A (en
Inventor
彩 鈴木
彩 鈴木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2017027690A priority Critical patent/JP6626466B2/en
Publication of JP2018133022A publication Critical patent/JP2018133022A/en
Application granted granted Critical
Publication of JP6626466B2 publication Critical patent/JP6626466B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Description

本発明は、API使用権委譲の同意応答やユーザのアカウントを管理する技術に関する。   The present invention relates to a technique for managing a consent response of delegation of API usage rights and a user account.

クライアントアプリケーションがWeb−API(Web Application Programming Interface)を利用する際、API提供装置とのAPI利用認証を行う技術として、非特許文献1,2がある。   Non-Patent Documents 1 and 2 disclose techniques for performing API use authentication with an API providing device when a client application uses a Web-API (Web Application Programming Interface).

“OAth 2.0”、[online]、[平成29年2月6日検索]、<URL: https://oauth.net/2/>"OAth 2.0", [online], [Searched February 6, 2017], <URL: https://oauth.net/2/> “The OAuth 2.0 Authorization Framework,4.1. Authorization Code Grant”、[online]、[平成29年2月13日検索]、<URL: https://tools.ietf.org/html/rfc6749#section-4.1>“The OAuth 2.0 Authorization Framework, 4.1. Authorization Code Grant”, [online], [searched February 13, 2017], <URL: https://tools.ietf.org/html/rfc6749#section-4.1>

APIの再販を行うビジネスモデルの場合、複数のAPI提供装置が多段に接続される。このとき、API利用認証において、複数のAPI提供装置がエンドユーザに対してAPI使用権委譲の同意をそれぞれ要求するため、エンドユーザは複数の同意要求に対して応答する必要があり、クライアントアプリケーション利用の利便性に欠けるという課題がある。また、その同意要求がAPI卸元事業者のAPI提供装置からエンドユーザに直接送信されるため、API卸元事業者をユーザやクライアントに隠ぺいしたいという要件を満たすことができない。   In the case of an API resale business model, a plurality of API providing devices are connected in multiple stages. At this time, in the API use authentication, since the plurality of API providing devices request the end user to consent to the transfer of the API use right, the end user needs to respond to the plurality of consent requests. There is a problem of lack of convenience. In addition, since the consent request is transmitted directly from the API providing device of the API wholesaler to the end user, it is not possible to satisfy the requirement of hiding the API wholesaler from the user or the client.

本発明は、上記事情を鑑みてなされたものであり、API使用権委譲の同意に係るユーザの負担を改善し、API卸元事業者のAPI提供装置を隠ぺいすることを目的とする。   The present invention has been made in view of the above circumstances, and has as its object to improve the user's burden of agreeing to transfer the API usage right and hide the API providing device of the API wholesaler.

以上の課題を解決するため、請求項1に係るAPI提供装置は、APIの使用権を委譲することに同意したユーザの同意情報に基づき、他のAPI提供装置から前記ユーザへのAPI使用権委譲の同意要求に対して同意を示す同意情報を送信する応答部を備えることを特徴とする。   In order to solve the above problem, an API providing device according to claim 1 transfers an API usage right from another API providing device to the user based on consent information of a user who has agreed to transfer the usage right of the API. And a response unit for transmitting consent information indicating consent to the consent request.

請求項2に係るAPI提供装置は、請求項1に記載のAPI提供装置において、自API提供装置の利用者と前記他のAPI提供装置の利用者がそれぞれ前記ユーザに発行したユーザの識別情報を関連付けて記憶する記憶部を更に備えることを特徴とする。   The API providing device according to claim 2 is the API providing device according to claim 1, wherein the user of the own API providing device and the user of the another API providing device respectively issue identification information of the user issued to the user. It is characterized by further comprising a storage unit for storing in association with.

請求項3に係るAPI使用権委譲の同意方法は、API提供装置で行うAPI使用権委譲の同意方法において、前記API提供装置が、APIの使用権を委譲することに同意したユーザの同意情報に基づき、他のAPI提供装置から前記ユーザへのAPI使用権委譲の同意要求に対して同意を示す同意情報を送信するステップを行うことを特徴とする。   The consent method of delegating the API usage right according to claim 3 is a method of consent of delegation of the API usage right performed by the API providing device, wherein the API providing device adds the consent information of the user who has agreed to delegate the usage right of the API. A step of transmitting consent information indicating consent from another API providing apparatus to a consent request for transfer of an API use right to the user.

請求項4に係るAPI使用権委譲の同意方法は、請求項3に記載のAPI使用権委譲の同意方法において、前記ステップを行う前に、自API提供装置の利用者と前記他のAPI提供装置の利用者がそれぞれ前記ユーザに発行したユーザの識別情報を関連付けて記憶部に記憶するステップを行うことを特徴とする。   According to a fourth aspect of the present invention, there is provided an API usage right delegation consent method according to the third aspect, wherein the user of the own API providing device and the other API providing device are provided before performing the step. And storing the user identification information in the storage unit in association with the user identification information issued to the user.

本発明によれば、API使用権委譲の同意に係るユーザの負担を軽減し、API卸元事業者のAPI提供装置を隠ぺいすることができる。   ADVANTAGE OF THE INVENTION According to this invention, the burden of the user concerning the consent of transfer of API use right can be reduced and the API provision apparatus of the API wholesaler can be hidden.

システム構成を示す図である。It is a figure showing a system configuration. システム全体の処理シーケンスを示す図である。It is a figure showing the processing sequence of the whole system. APIリクエスト処理部11の処理フローを示す図である。FIG. 3 is a diagram illustrating a processing flow of an API request processing unit 11. 認可リクエスト検証部13の処理フローを示す図である。FIG. 4 is a diagram illustrating a processing flow of an authorization request verification unit 13. ユーザ認証部14の処理フローを示す図である。FIG. 3 is a diagram illustrating a processing flow of a user authentication unit 14. APIリクエスト生成部15の処理フローを示す図である。FIG. 4 is a diagram illustrating a processing flow of an API request generation unit 15. APIレスポンス処理部16の処理フローを示す図である。FIG. 3 is a diagram illustrating a processing flow of an API response processing unit 16. ユーザ認証応答部17の処理フローを示す図である。FIG. 4 is a diagram showing a processing flow of a user authentication response unit 17; 認可コード発行部18の処理フローを示す図である。FIG. 4 is a diagram showing a processing flow of an authorization code issuing unit 18; APIレスポンス生成部12の処理フローを示す図である。FIG. 3 is a diagram illustrating a processing flow of an API response generation unit 12. トークンリクエスト検証部19の処理フローを示す図である。FIG. 3 is a diagram showing a processing flow of a token request verification unit 19; アクセストークン発行部20の処理フローを示す図である。FIG. 3 is a diagram illustrating a processing flow of an access token issuing unit 20. アクセストークン検証部21の処理フローを示す図である。FIG. 3 is a diagram showing a processing flow of an access token verification unit 21. アクセストークン変換部22の処理フローを示す図である。FIG. 4 is a diagram showing a processing flow of an access token conversion unit 22. ユーザ認証情報の例を示す図である。FIG. 4 is a diagram illustrating an example of user authentication information. アクセストークンの例を示す図である。It is a figure showing an example of an access token. 認可コードの例を示す図である。It is a figure showing an example of an authorization code. 本実施の形態と従来例との概説図である。It is a schematic diagram of this embodiment and a conventional example.

上記課題を解決するため、本発明は、多段接続された複数のAPI提供装置において、API卸売事業者のAPI提供装置(上位API提供装置)に疑似ユーザ機能を具備する。そして、その疑似ユーザ機能で、API卸元事業者のAPI提供装置(下位API提供装置)からユーザへのAPI使用権委譲の同意要求に対し、API使用権の委譲に同意したユーザの同意情報に基づき、ユーザに代わりユーザの同意を自ら代理応答する。これにより、API使用権委譲の同意に係るユーザの負担を軽減し、API卸元事業者のAPI提供装置を隠ぺいしつつAPIを提供することができる。以下、本発明を実施する一実施の形態について図面を用いて説明する。   In order to solve the above-mentioned problem, the present invention provides a plurality of API providing apparatuses connected in multiple stages, in which an API providing apparatus (an upper-level API providing apparatus) of an API wholesaler has a pseudo user function. Then, in response to the consent request of the transfer of the API usage right from the API providing device (lower API providing device) of the API wholesaler to the user, the pseudo user function adds the consent information of the user who has consented to the transfer of the API usage right. Based on the user's behalf, the user's consent is sent by proxy. As a result, it is possible to reduce the burden on the user relating to the consent to the transfer of the API usage right, and to provide the API while hiding the API providing device of the API wholesaler. Hereinafter, an embodiment of the present invention will be described with reference to the drawings.

本実施の形態に係るシステム構成を図1に示す。このシステム構成では、エンドユーザ利用端末1と、API利用装置3と、上位API提供装置5と、下位API提供装置7と、リソースサーバ9と、を備えて構成される。図1に示したAPI提供装置の接続構成は2段の例であり、例えば3段以上を多段接続してもよい。   FIG. 1 shows a system configuration according to the present embodiment. This system configuration includes an end-user use terminal 1, an API use device 3, an upper API provision device 5, a lower API provision device 7, and a resource server 9. The connection configuration of the API providing device illustrated in FIG. 1 is an example of two stages, and for example, three or more stages may be connected in multiple stages.

エンドユーザ利用端末1は、例えば携帯電話やスマートフォンなど、リソースサーバ9などで提供されるサービスをクライアント側で実行するための装置である。また、API利用装置3は、そのサービスをクライアント側で実行するアプリケーション又はその装置である。そのアプリケーションをエンドユーザ利用端末1の内部で実行してもよい。   The end-user terminal 1 is a device for executing services provided by the resource server 9 on the client side, such as a mobile phone and a smartphone. The API using device 3 is an application or a device for executing the service on the client side. The application may be executed inside the end user terminal 1.

上位API提供装置5は、サービスに係るソフトウェアの機能をAPIとして提供する装置であり、API提供前にエンドユーザに対してAPI使用権委譲の同意を要求する「同意要求機能」、エンドユーザからの同意を受信済であれば下位API提供装置7からエンドユーザへのAPI使用権委譲の同意要求に対してユーザの同意を代理応答する「疑似ユーザ機能」などを備える。本実施の形態において上位API提供装置5はAPI卸売事業者により利用される。   The higher-level API providing device 5 is a device that provides software functions related to the service as an API. The “consent request function” for requesting the end user to consent to the transfer of the API usage right before the API is provided. If the consent has been received, a “pseudo-user function” is provided to proxyly consent the user's consent to the consent request for transfer of the API usage right from the lower API providing device 7 to the end user. In the present embodiment, the higher-level API providing device 5 is used by an API wholesale business.

一方、下位API提供装置7は、API卸元事業者により利用され、上記同意要求機能などを備える。下位API提供装置7は、基本的には従来のAPI提供装置であり、その一方で上位API提供装置5は、従来のAPI提供装置に対して上記「疑似ユーザ機能」を追加して構成されている。   On the other hand, the lower API providing device 7 is used by an API wholesaler and has the above-described consent request function. The lower API providing device 7 is basically a conventional API providing device, while the upper API providing device 5 is configured by adding the “pseudo user function” to the conventional API providing device. I have.

また、上位API提供装置5は、下位API提供装置7に対してユーザの同意を代理応答するにあたり、下位API提供装置7へログインを行う必要がある。そこで、下位API提供装置7がエンドユーザに対して発行したユーザID及びパスワードを保持・管理する「ユーザアカウント管理機能」を更に備える。   Further, the upper API providing device 5 needs to log in to the lower API providing device 7 when making a proxy response of the user's consent to the lower API providing device 7 by proxy. Therefore, a “user account management function” for retaining and managing the user ID and password issued to the end user by the lower API providing device 7 is further provided.

上位API提供装置5の構成例について説明する。本実施の形態において、上位API提供装置5は、図1に示したように、APIリクエスト処理部11と、APIレスポンス生成部12と、認可リクエスト検証部13と、ユーザ認証部14と、APIリクエスト生成部15と、APIレスポンス処理部16と、ユーザ認証応答部17と、認可コード発行部18と、トークンリクエスト検証部19と、アクセストークン発行部20と、アクセストークン検証部21と、アクセストークン変換部22と、ユーザ認証情報記憶部23と、認可コード記憶部24と、アクセストークン記憶部25と、を備えて構成される。   A configuration example of the higher-level API providing device 5 will be described. In the present embodiment, as shown in FIG. 1, the higher-level API providing device 5 includes an API request processing unit 11, an API response generation unit 12, an authorization request verification unit 13, a user authentication unit 14, an API request Generating unit 15, API response processing unit 16, user authentication response unit 17, authorization code issuing unit 18, token request verifying unit 19, access token issuing unit 20, access token verifying unit 21, access token converting unit A storage unit 22, a user authentication information storage unit 23, an authorization code storage unit 24, and an access token storage unit 25.

図1では、従来のAPI提供装置に対する追加機能部に斜めハッチを施している。上述した「疑似ユーザ機能」は、APIリクエスト生成部15と、APIレスポンス処理部16と、ユーザ認証応答部17と、で構成される。また、上述した「ユーザアカウント管理機能」は、ユーザ認証情報記憶部23で構成される。これら4つの機能部が互いに連携して動作することにより、下位API提供装置7に対してログイン処理及びユーザ同意の代理応答処理を実行する。   In FIG. 1, an oblique hatching is added to an additional function unit with respect to the conventional API providing device. The “pseudo-user function” described above includes an API request generation unit 15, an API response processing unit 16, and a user authentication response unit 17. The “user account management function” described above includes the user authentication information storage unit 23. By operating these four functional units in cooperation with each other, a login process and a proxy response process of user consent are performed on the lower API providing device 7.

また、これら4つの機能部と後述するアクセストークン変換部22を除く他の全ての機能部は、従来のAPI提供装置が備える機能部であり、「OAuth 2.0」などで規定された認可サーバとして機能する。この認可サーバについては非特許文献1,2に詳しいが、簡易には、リソース利用の認証と認可の取得が成功した後にトークン(クライアントに対して発行されたアクセス認可を表す文字列であり、リソース側で認可された権限の範囲とアクセス期間を示す)を発行するサーバである。但し、本実施の形態では、「疑似ユーザ機能」でユーザの代理応答を行うため、APIリクエストに含まれるトークンを下位API提供装置7が発行したトークンに変換する必要がある。そこで、上位API提供装置5は、トークンを変換する「トークン変換機能」も更に備える。この「トークン変換機能」は、アクセストークン変換部22で構成される。   In addition, these four functional units and all the other functional units except for the access token converting unit 22 described later are functional units included in the conventional API providing device, and function as an authorization server defined by “OAuth 2.0” or the like. I do. This authorization server is described in detail in Non-Patent Documents 1 and 2. However, simply, a token (a character string representing an access authorization issued to a client, (Indicating the range of authority and access period granted by the client). However, in the present embodiment, the token included in the API request needs to be converted into a token issued by the lower-level API providing device 7 in order to perform the proxy response of the user with the “pseudo-user function”. Therefore, the higher-level API providing device 5 further includes a “token conversion function” for converting a token. This “token conversion function” is configured by the access token conversion unit 22.

下位API提供装置7は、認可サーバとして機能する従来のAPI提供装置である。具体的には、下位API提供装置7は、図1に示した上位API提供装置5から、APIリクエスト生成部15と、APIレスポンス処理部16と、ユーザ認証応答部17と、ユーザ認証情報記憶部23と、アクセストークン変換部22と、を除く機能部により構成される。   The lower API providing device 7 is a conventional API providing device that functions as an authorization server. Specifically, the lower API providing device 7 includes an API request generating unit 15, an API response processing unit 16, a user authentication responding unit 17, a user authentication information storing unit, and the like from the upper API providing device 5 shown in FIG. 23 and a function unit excluding the access token conversion unit 22.

リソースサーバ9は、所定のサービスを提供するサーバである。   The resource server 9 is a server that provides a predetermined service.

次に、上位API提供装置5の動作について説明する。   Next, the operation of the higher-level API providing device 5 will be described.

まず、その動作を概説する。上位API提供装置5がAPI利用装置3(クライアント)からのAPI利用リクエストを受信すると、API使用権委譲の同意をユーザに要求する。ユーザの承諾後、上位API提供装置5から下位API提供装置7へAPI利用リクエストを送信する。その後、API使用権委譲の同意が下位API提供装置から上位API提供装置へ要求されるが、ユーザの同意を既に受信しているので、上位API提供装置5の疑似ユーザ機能が保存済のユーザ認証情報を利用して同意に自動応答し、認証プロセスを通過する。   First, the operation will be outlined. When receiving the API use request from the API use device 3 (client), the higher-level API providing device 5 requests the user to consent to the transfer of the API use right. After the user's consent, the upper API providing device 5 transmits an API use request to the lower API providing device 7. Thereafter, the consent of the transfer of the API usage right is requested from the lower API providing device to the upper API providing device, but since the user's consent has already been received, the user authentication in which the pseudo user function of the upper API providing device 5 is stored. Use the information to automatically respond to your consent and go through the authentication process.

続いて、その動作を詳述する。図2は、システム全体の処理シーケンスである。図3〜図14は、上位API提供装置5を構成する各機能部の処理フローを示す図である。図15〜図17は、本処理シーケンスで用いる各種データの例を示す図である。   Subsequently, the operation will be described in detail. FIG. 2 shows a processing sequence of the entire system. FIG. 3 to FIG. 14 are diagrams illustrating a processing flow of each functional unit configuring the higher-level API providing apparatus 5. FIGS. 15 to 17 are diagrams showing examples of various data used in the present processing sequence.

なお、予めユーザとAPI卸売事業者とAPI卸元事業者との間で、「API使用権委譲について、ユーザが上位API提供装置5からの同意要求に対して同意を承諾したことを以て、下位API提供装置7からの同意要求も承諾したとみなす」ことが成立しているものとする。   It should be noted that the user, the API wholesale business, and the API wholesale business previously set a lower API in accordance with the agreement of the transfer of the API usage right by the user accepting the consent to the consent request from the higher API providing apparatus 5. It is considered that the consent request from the providing device 7 is also accepted. "

また、上位API提供装置5は、予め下位API提供装置7へユーザ登録を行い、払い出されたユーザ認証情報(ユーザID及びパスワード)を保存及び管理を行っているものとする。具体的には、上位API提供装置5のユーザ認証情報記憶部23が、上位API提供装置5のAPI卸売事業者がエンドユーザに既に発行したユーザIDをキーに、下位API提供装置7のAPI卸元事業者が上位API提供装置5(=疑似エンドユーザ)に発行したユーザID及びパスワードを関連付けて記憶する(後述する図15を参照)。   It is also assumed that the higher-level API providing apparatus 5 performs user registration with the lower-level API providing apparatus 7 in advance, and stores and manages the issued user authentication information (user ID and password). Specifically, the user authentication information storage unit 23 of the higher-level API providing apparatus 5 stores the API wholesaler of the lower-level API providing apparatus 7 with the user ID already issued to the end user by the API wholesaler of the higher-level API providing apparatus 5 as a key. The user ID and the password issued by the former company to the higher-level API providing apparatus 5 (= pseudo end user) are stored in association with each other (see FIG. 15 described later).

まず、図2に示すように、エンドユーザが上位API提供装置5でクライアントアプリの利用を開始すると、APIのアクセスに係る認可リクエストがエンドユーザ利用端末1を介してAPI利用装置3から上位API提供装置5へ送信される。   First, as shown in FIG. 2, when the end user starts using the client application on the higher-level API providing device 5, an authorization request related to API access is provided from the higher-level API providing device 3 through the end-user using terminal 1. It is transmitted to the device 5.

次に、上位API提供装置5は、図2のステップAの処理を実行する。図3(a)に示すように、APIリクエスト処理部11は、API利用装置3よりリダイレクトされたエンドユーザ利用端末1からの認可リクエストを受信し(ステップA1)、認可リクエスト検証部13へ該認可リクエストを送信する(ステップA2)。   Next, the higher-level API providing device 5 executes the process of step A in FIG. As shown in FIG. 3A, the API request processing unit 11 receives the authorization request from the end user terminal 1 redirected from the API using device 3 (step A1), and sends the authorization request to the authorization request verification unit 13. A request is transmitted (step A2).

次に、上位API提供装置5は、図2のステップB,Cの処理を実行する。図4に示すように、認可リクエスト検証部13は、APIリクエスト処理部11から認可リクエストを受信し(ステップB1)、その認可リクエストに含まれるパラメータが規定に合致しているか否かを判定する(ステップB2)。その後、そのパラメータが規定に合致している場合、ユーザ認証部14へユーザ認証開始信号を送信する(ステップB3)。一方、そのパラメータが規定に合致しない場合、エラー信号を生成してAPI利用装置3へ送信する(ステップB4)。以降、ユーザ認証部14へユーザ認証開始信号を送信したものとする。   Next, the higher-level API providing device 5 executes the processing of steps B and C in FIG. As shown in FIG. 4, the authorization request verification unit 13 receives an authorization request from the API request processing unit 11 (step B1), and determines whether or not parameters included in the authorization request conform to the rules (step B1). Step B2). Thereafter, if the parameter matches the regulation, a user authentication start signal is transmitted to the user authentication unit 14 (step B3). On the other hand, if the parameter does not match the regulation, an error signal is generated and transmitted to the API using device 3 (step B4). Hereinafter, it is assumed that a user authentication start signal has been transmitted to the user authentication unit 14.

その後、図5に示すように、ユーザ認証部14は、認可リクエスト検証部13からユーザ認証開始信号を受信し(ステップC1)、エンドユーザ利用端末1へユーザ認証画面及びAPI使用権委譲の同意画面の画面データを送信する(ステップC2)。そして、エンドユーザ利用端末1からユーザ認証情報及びAPI使用権委譲の同意に対する認可又は拒否の応答を受信し(ステップC3)、受信した応答に基づき、ユーザ認証が成功し、かつ、API使用権委譲の同意が認可されたかを判定する(ステップC4)。ユーザ認証が成功し、かつ、API使用権委譲の同意が認可された場合、APIリクエスト生成部15へ認可リクエスト開始信号を送信する(ステップC5)。一方、ユーザ認証が成功しない場合、又は、API使用権委譲の同意が認可されていない場合、エラー信号を生成してAPI利用装置3へ送信する(ステップC6)。   Thereafter, as shown in FIG. 5, the user authentication unit 14 receives a user authentication start signal from the authorization request verification unit 13 (step C1), and sends a user authentication screen and an API usage right transfer consent screen to the end user terminal 1. Is transmitted (step C2). Then, it receives the user authentication information and the response of approval or denial with respect to the consent of the transfer of the API usage right from the end user terminal 1 (step C3), and based on the received response, the user authentication is successful and the transfer of the API usage right is performed. Is determined (step C4). If the user authentication has succeeded and the consent to transfer the API usage right has been approved, an authorization request start signal is transmitted to the API request generation unit 15 (step C5). On the other hand, if the user authentication is not successful, or if the consent of the transfer of the API usage right has not been approved, an error signal is generated and transmitted to the API using device 3 (step C6).

以降、APIリクエスト生成部15へ認可リクエスト開始信号を送信したものとする。なお、上位API提供装置5は、ユーザ認証結果やユーザによるAPI使用権委譲への同意応答など、エンドユーザ利用端末1、API利用装置3又は下位API提供装置7との間でやりとりされた全てのデータをメモリやハードディスクなどに随時保存しておく。   Hereinafter, it is assumed that an authorization request start signal has been transmitted to the API request generation unit 15. Note that the higher-level API providing apparatus 5 receives all information exchanged with the end-user using terminal 1, the API-using apparatus 3, or the lower-level API providing apparatus 7, such as a result of user authentication and an agreement response to the transfer of the API usage right by the user. Save the data to a memory or hard disk at any time.

次に、上位API提供装置5は、図2のステップDの処理を実行する。図6(a)に示すように、APIリクエスト生成部15は、ユーザ認証部14から認可リクエスト開始信号を受信し(ステップD1)、その認可リクエストをAPI卸元事業者の下位API提供装置7へ送信する(ステップD2)。   Next, the higher-level API providing device 5 executes the process of step D in FIG. As shown in FIG. 6A, the API request generation unit 15 receives an authorization request start signal from the user authentication unit 14 (step D1), and sends the authorization request to the API wholesaler 7 under the API wholesaler. Transmit (step D2).

次に、上位API提供装置5は、図2のステップE,F,Gの処理を実行する。図7(a)に示すように、APIレスポンス処理部16は、API卸元事業者の下位API提供装置7からユーザ認証画面及びAPI使用権委譲の同意画面の画面データを受信し(ステップE1)、ユーザ認証応答部17に該画面データを送信する(ステップE2)。   Next, the higher-level API providing device 5 executes the processing of steps E, F, and G in FIG. As shown in FIG. 7A, the API response processing unit 16 receives the screen data of the user authentication screen and the consent screen of the transfer of the API usage right from the API providing apparatus 7 of the API wholesaler (step E1). Then, the screen data is transmitted to the user authentication response unit 17 (step E2).

その後、図8に示すように、ユーザ認証応答部17は、APIレスポンス処理部16からユーザ認証画面及びAPI使用権委譲の同意画面の画面データを受信し(ステップF1)、ユーザ認証情報記憶部23に認証情報を問い合わせる(ステップF2)。そして、ユーザ認証及びAPI使用権委譲の同意に応答する伝文を組み立て、APIリクエスト生成部15に送信する(ステップF3)。   Thereafter, as shown in FIG. 8, the user authentication response unit 17 receives the screen data of the user authentication screen and the consent screen of the transfer of the API usage right from the API response processing unit 16 (step F1), and the user authentication information storage unit 23 (Step F2). Then, a message that responds to the user authentication and the consent of the transfer of the API usage right is assembled and transmitted to the API request generation unit 15 (step F3).

その後、図6(b)に示すように、APIリクエスト生成部15は、ユーザ認証応答部17からユーザ認証及びAPI使用権委譲の同意に応答する伝文を受信し(ステップG1)、ユーザ同意応答をAPI卸元事業者の下位API提供装置7へ送信する(ステップG2)。   Thereafter, as shown in FIG. 6B, the API request generation unit 15 receives a message responding to the user authentication and the consent of the delegation of the API usage right from the user authentication response unit 17 (step G1), and responds to the user consent response. Is transmitted to the lower API providing device 7 of the API wholesaler (step G2).

ここで、ステップF,Gの動作を詳述する。ユーザは、予め下位API提供装置7からのAPI使用権委譲の同意要求に対して同意承諾を擬制し、また、既に上位API提供装置5に対してAPI使用権の委譲に同意を示している。それゆえ、ユーザ認証応答部17は、そのユーザの同意に基づき、下位API提供装置7へのログイン及びユーザ同意処理を自動で開始する。具体的には、ユーザ認証情報記憶部23(図15参照)から、対象ユーザのユーザID(上位API提供装置5が発行したユーザID)に対応する、下位API提供装置7のAPI卸元事業者が発行したユーザID及びパスワードを取得し、そのユーザID及びパスワードとユーザの同意を示す同意情報とに基づき下位API提供装置7へのログイン処理及び同意処理を実行する。   Here, the operations of steps F and G will be described in detail. The user preliminarily simulates consent and consent in response to the consent request for transfer of the API use right from the lower API providing device 7, and has already indicated consent to the transfer of the API use right to the upper API providing device 5. Therefore, the user authentication response unit 17 automatically starts the log-in to the lower API providing device 7 and the user agreement process based on the agreement of the user. Specifically, from the user authentication information storage unit 23 (see FIG. 15), the API wholesaler of the lower API providing device 7 corresponding to the user ID of the target user (the user ID issued by the upper API providing device 5) , And executes a login process and a consent process to the lower API providing device 7 based on the user ID and the password and consent information indicating consent of the user.

次に、上位API提供装置5は、図2のステップHの処理を実行する。図7(b)に示すように、APIレスポンス処理部16は、API卸元事業者の下位API提供装置7から認可レスポンスを受信し(ステップH1)、その認可レスポンス内の認可コード(B)をAPIリクエスト生成部15に送信する(ステップH2)。   Next, the higher-level API providing device 5 executes the process of Step H in FIG. As shown in FIG. 7B, the API response processing unit 16 receives the authorization response from the API providing device 7 of the API wholesaler (step H1), and converts the authorization code (B) in the authorization response. The request is transmitted to the API request generator 15 (step H2).

次に、上位API提供装置5は、図2のステップIの処理を実行する。図6(c)に示すように、APIリクエスト生成部15は、APIレスポンス処理部16から認可コード(B)を受信し(ステップI1)、その認可コード(B)を含めたトークンリクエストをAPI卸元事業者の下位API提供装置7へ送信する(ステップI2)。   Next, the higher-level API providing device 5 executes the process of step I in FIG. As shown in FIG. 6C, the API request generation unit 15 receives the authorization code (B) from the API response processing unit 16 (Step I1), and sends the token request including the authorization code (B) to the API wholesaler. The data is transmitted to the lower API providing device 7 of the former business entity (step I2).

次に、上位API提供装置5は、図2のステップJ,K,Lの処理を実行する。図7(c)に示すように、APIレスポンス処理部16は、API卸元事業者の下位API提供装置7からトークンレスポンスを受信し(ステップJ1)、そのトークンレスポンスに含まれるアクセストークン(B)をアクセストークン記憶部25(図16参照)に格納し(ステップJ2)、認可コード発行部18へ認可レスポンス開始信号を送信する(ステップJ3)。   Next, the higher-level API providing device 5 executes the processing of steps J, K, and L in FIG. As shown in FIG. 7 (c), the API response processing unit 16 receives a token response from the lower API providing device 7 of the API wholesaler (step J1), and an access token (B) included in the token response. Is stored in the access token storage unit 25 (see FIG. 16) (step J2), and an authorization response start signal is transmitted to the authorization code issuing unit 18 (step J3).

その後、図9に示すように、認可コード発行部18は、APIレスポンス処理部16から認可レスポンス開始信号を受信し(ステップK1)、認可コード(A)を発行して認可コード記憶部24(図17参照)に格納する(ステップK2)。そして、その認可コード(A)をAPIレスポンス生成部12に送信する(ステップK3)。   Thereafter, as shown in FIG. 9, the authorization code issuing unit 18 receives the authorization response start signal from the API response processing unit 16 (step K1), issues the authorization code (A), and issues the authorization code (A). 17 (step K2). Then, the authorization code (A) is transmitted to the API response generator 12 (step K3).

その後、図10(a)に示すように、APIレスポンス生成部12は、認可コード発行部18から認可コード(A)を受信し(ステップL1)、エンドユーザ利用端末1へ該認可コード(A)を含む認可レスポンスを送信する(ステップL2)。この認可レスポンスは、API利用装置3へリダイレクトされる。   Thereafter, as shown in FIG. 10A, the API response generation unit 12 receives the authorization code (A) from the authorization code issuing unit 18 (Step L1), and sends the authorization code (A) to the end-user terminal 1. Is transmitted (step L2). This authorization response is redirected to the API using device 3.

次に、上位API提供装置5は、図2のステップM,N,O,Pの処理を実行する。図3(b)に示すように、APIリクエスト処理部11は、API利用装置3から認可コード(A)を含むトークンリクエストを受信し(ステップM1)、そのトークンリクエストをトークンリクエスト検証部19へ送信する(ステップM2)。   Next, the higher-level API providing device 5 executes the processing of steps M, N, O, and P in FIG. As shown in FIG. 3B, the API request processing unit 11 receives a token request including the authorization code (A) from the API using device 3 (Step M1), and transmits the token request to the token request verification unit 19. (Step M2).

その後、図11に示すように、トークンリクエスト検証部19は、APIリクエスト処理部11からトークンリクエストを受信し(ステップN1)、そのトークンリクエストに含まれるパラメータが規定に合致しているか否かを判定する(ステップN2)。そして、そのパラメータが規定に合致している場合、アクセストークン発行部20へトークン発行信号を送信する(ステップN3)。一方、そのパラメータが規定に合致しない場合、エラー信号を生成してAPI利用装置3へ送信する(ステップN4)。以降、アクセストークン発行部20へトークン発行信号を送信したものとする。   Thereafter, as shown in FIG. 11, the token request verification unit 19 receives the token request from the API request processing unit 11 (Step N1), and determines whether or not the parameters included in the token request conform to the rules. (Step N2). Then, if the parameter matches the regulation, a token issuing signal is transmitted to the access token issuing unit 20 (step N3). On the other hand, if the parameter does not match the regulation, an error signal is generated and transmitted to the API using device 3 (step N4). Hereinafter, it is assumed that a token issuance signal is transmitted to the access token issuance unit 20.

その後、図12に示すように、アクセストークン発行部20は、トークンリクエスト検証部19からトークン発行信号を受信し(ステップO1)、アクセストークン(A)を発行してアクセストークン記憶部25に格納する(ステップO2)。そして、そのアクセストークン(A)をAPIレスポンス生成部12に送信する(ステップO3)。   Thereafter, as shown in FIG. 12, the access token issuing unit 20 receives the token issuing signal from the token request verifying unit 19 (Step O1), issues the access token (A), and stores it in the access token storage unit 25. (Step O2). Then, the access token (A) is transmitted to the API response generation unit 12 (Step O3).

その後、図10(b)に示すように、APIレスポンス生成部12は、アクセストークン発行部20からアクセストークン(A)を受信し(ステップP1)、API利用装置3へ該アクセストークン(A)を含むトークンレスポンスを送信する(ステップP2)。   Thereafter, as shown in FIG. 10B, the API response generation unit 12 receives the access token (A) from the access token issuing unit 20 (Step P1), and sends the access token (A) to the API using device 3. A token response including the token response is transmitted (step P2).

次に、上位API提供装置5は、図2のステップQ,R,Sの処理を実行する。図3(c)に示すように、APIリクエスト処理部11は、API利用装置3からアクセストークン(A)を含むAPIリクエストを受信し(ステップQ1)、アクセストークン検証部21へ該APIリクエストを送信する(ステップQ2)。   Next, the higher-level API providing device 5 executes the processing of steps Q, R, and S in FIG. As shown in FIG. 3C, the API request processing unit 11 receives an API request including the access token (A) from the API using device 3 (Step Q1) and transmits the API request to the access token verification unit 21. (Step Q2).

その後、図13に示すように、アクセストークン検証部21は、APIリクエスト処理部11からAPIリクエストを受信し(ステップR1)、そのAPIリクエストに含まれるアクセストークン(A)がアクセストークン記憶部25のアクセストークンに合致するか否かを確認し(ステップR2)、APIリクエストのパラメータが規定に合致しているか否かを判定する(ステップR3)。そして、アクセストークンが合致し、かつ、パラメータが規定に合致している場合、アクセストークン変換部22へAPIリクエストを送信する(ステップR4)。一方、アクセストークンが合致しない場合、又は、パラメータが規定に合致しない場合、エラー信号を生成してAPI利用装置3へ送信する(ステップR5)。以降、アクセストークン変換部22へAPIリクエストを送信したものとする。   Thereafter, as shown in FIG. 13, the access token verification unit 21 receives the API request from the API request processing unit 11 (step R1), and stores the access token (A) included in the API request in the access token storage unit 25. It is determined whether or not the access request matches the access token (step R2), and it is determined whether or not the parameter of the API request matches the regulation (step R3). Then, if the access token matches and the parameter matches the regulation, an API request is transmitted to the access token converter 22 (step R4). On the other hand, if the access tokens do not match, or if the parameters do not match the specifications, an error signal is generated and transmitted to the API using device 3 (step R5). Hereinafter, it is assumed that the API request is transmitted to the access token conversion unit 22.

その後、図14に示すように、アクセストークン変換部22は、アクセストークン検証部21からアクセストークン(A)を含むアクセストークンAPIリクエストを受信し(ステップS1)、アクセストークン記憶部25へAPI卸元事業者の下位API提供装置7から受信したアクセストークン(B)を問い合わせて取得する(ステップS2)。そして、APIリクエスト内のアクセストークン(A)をアクセストークン(B)に変換し(ステップS3)、API卸元事業者の下位API提供装置7へ変換後のAPIリクエストを送信する(ステップS4)。   Thereafter, as shown in FIG. 14, the access token conversion unit 22 receives the access token API request including the access token (A) from the access token verification unit 21 (step S1), and sends the API wholesale source to the access token storage unit 25. The access token (B) received from the lower API providing device 7 of the business entity is queried and acquired (step S2). Then, the access token (A) in the API request is converted into the access token (B) (step S3), and the converted API request is transmitted to the lower API providing device 7 of the API wholesaler (step S4).

最後に、上位API提供装置5は、図2のステップTの処理を実行する。図10(c)に示すように、APIレスポンス生成部12は、API卸元事業者の下位API提供装置7からAPIレスポンスを受信し(ステップT1)、API利用装置3へ該APIレスポンスを送信する(ステップT2)。   Finally, the higher-level API providing device 5 executes the process of step T in FIG. As shown in FIG. 10C, the API response generation unit 12 receives an API response from the lower API providing device 7 of the API wholesaler (step T1), and transmits the API response to the API using device 3. (Step T2).

以上より、本実施の形態によれば、API卸売事業者の上位API提供装置5が、API卸元事業者の下位API提供装置7からのAPI使用権委譲の同意要求に対してユーザの同意(同意情報)を代理応答するので、ユーザは複数のAPI提供装置からの各同意要求に応答不要となり、API使用権委譲の同意に係るユーザの負担を軽減し、ユーザやクライアントに対してAPI卸元事業者を隠ぺいすることができる(図18参照)。   As described above, according to the present embodiment, the API wholesaler's upper-level API providing apparatus 5 accepts the user's consent from the API wholesaler's lower-level API providing apparatus 7 for an API usage right transfer consent request ( The user does not need to respond to each consent request from a plurality of API providing devices, thereby reducing the burden on the user concerning the consent of delegating the API usage right and providing the API wholesaler to the user and the client. The business can be hidden (see FIG. 18).

最後に、本実施の形態で説明した上位API提供装置5は、コンピュータで実現できる。また、上位API提供装置5としてコンピュータを機能させるためのAPI提供プログラム、そのAPI提供プログラムの記憶媒体を作成することも可能である。   Lastly, the higher-level API providing device 5 described in the present embodiment can be realized by a computer. Further, it is also possible to create an API providing program for causing a computer to function as the higher-level API providing device 5 and a storage medium for the API providing program.

1…エンドユーザ利用端末
3…API利用装置
5…上位API提供装置
7…下位API提供装置
9…リソースサーバ
11…APIリクエスト処理部
12…APIレスポンス生成部
13…認可リクエスト検証部
14…ユーザ認証部
15…APIリクエスト生成部
16…APIレスポンス処理部
17…ユーザ認証応答部
18…認可コード発行部
19…トークンリクエスト検証部
20…アクセストークン発行部
21…アクセストークン検証部
22…アクセストークン変換部
23…ユーザ認証情報記憶部
24…認可コード記憶部
25…アクセストークン記憶部
DESCRIPTION OF SYMBOLS 1 ... End user use terminal 3 ... API use device 5 ... Upper API provision device 7 ... Lower API provision device 9 ... Resource server 11 ... API request processing part 12 ... API response generation part 13 ... Authorization request verification part 14 ... User authentication part 15 API request generation unit 16 API response processing unit 17 User authentication response unit 18 Authorization code issuing unit 19 Token request verification unit 20 Access token issuing unit 21 Access token verification unit 22 Access token conversion unit 23 User authentication information storage unit 24: authorization code storage unit 25: access token storage unit

Claims (2)

API(Application Programming Interface)提供装置において、
他のAPI提供装置が発行したユーザの識別情報を記憶する記憶部と、
前記他のAPI提供装置からユーザへのAPI使用権委譲の同意要求を受信する受信部と、
APIの使用権を委譲することに同意した前記ユーザの同意情報に基づき、前記記憶部から前記他のAPI提供装置に係る前記ユーザの識別情報を読み出して、前記ユーザの識別情報及び同意情報を含む伝文データを生成する生成部と、
前記同意要求に対して前記伝文データを前記ユーザの同意応答として前記他のAPI提供装置へ送信する送信部と
を備えることを特徴とするAPI提供装置。
In an API (Application Programming Interface) providing device,
A storage unit for storing user identification information issued by another API providing device,
A receiving unit that receives an API usage right transfer consent request from the other API providing device to the user;
Based on the agreement information of the user who agrees to transfer the right to use the AP I, reads the identification information of the user according to the another API providing device from the storage unit, the identification information and the agreement information of the user A generation unit that generates message data including
A transmission unit that transmits to the other API providing apparatus said Denbun data as consent response of the user to the consent request,
An API providing device, comprising:
API(Application Programming Interface)提供装置で行うAPI使用権委譲の同意方法において、In the method of consent of transfer of API usage right performed by an API (Application Programming Interface) providing device,
前記API提供装置が、The API providing device includes:
他のAPI提供装置が発行したユーザの識別情報を記憶部に記憶するステップと、Storing the user identification information issued by another API providing device in the storage unit;
前記他のAPI提供装置からユーザへのAPI使用権委譲の同意要求を受信するステップと、Receiving a consent request for transfer of API usage right from the other API providing device to the user;
APIの使用権を委譲することに同意した前記ユーザの同意情報に基づき、前記記憶部から前記他のAPI提供装置に係る前記ユーザの識別情報を読み出して、前記ユーザの識別情報及び同意情報を含む伝文データを生成するステップと、Based on the consent information of the user who has agreed to delegate the right to use the API, the identification information of the user related to the another API providing device is read from the storage unit, and the identification information and the consent information of the user are included. Generating message data;
前記同意要求に対して前記伝文データを前記ユーザの同意応答として前記他のAPI提供装置へ送信するステップと、Transmitting the message data to the other API providing device as the user's consent response to the consent request;
を行うことを特徴とするAPI使用権委譲の同意方法。And consent method of delegation of API usage right.
JP2017027690A 2017-02-17 2017-02-17 API providing apparatus and API use right transfer consent method Active JP6626466B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017027690A JP6626466B2 (en) 2017-02-17 2017-02-17 API providing apparatus and API use right transfer consent method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017027690A JP6626466B2 (en) 2017-02-17 2017-02-17 API providing apparatus and API use right transfer consent method

Publications (2)

Publication Number Publication Date
JP2018133022A JP2018133022A (en) 2018-08-23
JP6626466B2 true JP6626466B2 (en) 2019-12-25

Family

ID=63248460

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017027690A Active JP6626466B2 (en) 2017-02-17 2017-02-17 API providing apparatus and API use right transfer consent method

Country Status (1)

Country Link
JP (1) JP6626466B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7543154B2 (en) 2021-01-29 2024-09-02 キヤノン株式会社 Authentication federation server, authentication federation method, authentication federation system, and program
JP2023108355A (en) * 2022-01-25 2023-08-04 株式会社デンソー Vehicle utilization system, first server of vehicle utilization system, and vehicle utilization method

Also Published As

Publication number Publication date
JP2018133022A (en) 2018-08-23

Similar Documents

Publication Publication Date Title
EP3333744B1 (en) Authorization code flow for in-browser applications
CN102685202B (en) User ID is shared between operating system and application
JP6141076B2 (en) System, control method therefor, access management service system, control method therefor, and program
WO2013099065A1 (en) Authentication coordination system and id provider device
US20100274910A1 (en) Hosted application sandbox model
CN104255007A (en) Oauth framework
CN103370714B (en) Certification cooperative system, ID provider&#39;s device and its control method
EP3918495B1 (en) Methods, systems, and apparatuses for improved multi-factor authentication in a multi-app communication system
JPWO2005101220A1 (en) System, method, and program for user authentication and recording medium recording the program
JP5513500B2 (en) Displaying security identities using claims
US8613043B2 (en) Identity mediation in enterprise service bus
JP2010531516A (en) Device provisioning and domain join emulation over insecure networks
JP2013513880A (en) Method, system, and computer-usable program product for protecting asynchronous client-server transactions
US7930763B2 (en) Method of authorising a computing entity
JP2002334056A (en) System and method for executing log-in in behalf of user
JPWO2014049709A1 (en) Policy management system, ID provider system, and policy evaluation apparatus
WO2019159894A1 (en) Authentication approval information integration device and authentication approval information integration method
WO2014087731A1 (en) Information processing device, method for controlling information processing device, and control program
Singh et al. Identity management in cloud computing through claim-based solution
JP6626466B2 (en) API providing apparatus and API use right transfer consent method
JP6287213B2 (en) Proxy login device, terminal, control method, and program
CN104052602A (en) Prevention of password leakage with single sign on in conjunction with command line interfaces
JP2010165306A (en) Method and system for providing service, proxy device, program therefor
CN103856942A (en) Single sign-on method and device for smart phone operating system
JP7469247B2 (en) Authorization system, authorization server, client, user terminal, authorization method, and computer program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180724

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190521

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190712

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20191126

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20191129

R150 Certificate of patent or registration of utility model

Ref document number: 6626466

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150