Bug 31378: Add API routes
[koha.git] / api / v1 / swagger / paths / public_oauth.yaml
1 "/public/oauth/login/{provider}/{interface}":
2   get:
3     x-mojo-to: OAuth::Client#login
4     operationId: loginOAuthClient
5     tags:
6       - oauth
7     summary: Login to OAuth provider
8     produces:
9       - application/json
10     parameters:
11       - name: provider
12         in: path
13         description: Name of OAuth provider
14         required: true
15         type: string
16       - name: interface
17         in: path
18         description: Name of the interface this login is for
19         required: true
20         type: string
21       - name: code
22         in: query
23         description: Code returned from OAuth server for Authorization Code grant
24         required: false
25         type: string
26       - name: state
27         in: query
28         description: An opaque value used by the client to maintain state between the request and callback. This is the callback part.
29         required: false
30         type: string
31       - name: scope
32         in: query
33         description: Scope returned by OAuth server
34         type: string
35       - name: prompt
36         in: query
37         description: Prompt returned by OAuth server
38         type: string
39       - name: authuser
40         in: query
41         description: Auth user returned by OAuth server
42         type: string
43       - name: error
44         in: query
45         description: OAuth error code
46         type: string
47       - name: error_description
48         in: query
49         description: OAuth error description
50         type: string
51       - name: error_uri
52         in: query
53         description: Web page with user friendly description of the error
54         type: string
55     responses:
56       "302":
57         description: User authorized
58         schema:
59           type: string
60       "400":
61         description: Bad Request
62         schema:
63           $ref: "../swagger.yaml#/definitions/error"
64       "403":
65         description: Access forbidden
66         schema:
67           $ref: "../swagger.yaml#/definitions/error"