Bug 32354: Accept session_state param given by OAuth IdP
[koha.git] / api / v1 / swagger / paths / public_oauth.yaml
1 "/public/oauth/login/{provider_code}/{interface}":
2   get:
3     x-mojo-to: OAuth::Client#login
4     operationId: loginOAuthClientPublic
5     tags:
6       - oauth
7     summary: Login to OAuth provider
8     produces:
9       - application/json
10     parameters:
11       - name: provider_code
12         in: path
13         description: Code for 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
29           request and callback. This is the callback part.
30         required: false
31         type: string
32       - name: scope
33         in: query
34         description: Scope returned by OAuth server
35         type: string
36       - name: prompt
37         in: query
38         description: Prompt returned by OAuth server
39         type: string
40       - name: authuser
41         in: query
42         description: Auth user returned by OAuth server
43         type: string
44       - name: error
45         in: query
46         description: OAuth error code
47         type: string
48       - name: error_description
49         in: query
50         description: OAuth error description
51         type: string
52       - name: error_uri
53         in: query
54         description: Web page with user friendly description of the error
55         type: string
56       - name: session_state
57         in: query
58         description: Session state returned by OAuth server
59         type: string
60     responses:
61       "302":
62         description: User authorized
63         schema:
64           type: string
65       "400":
66         description: Bad Request
67         schema:
68           $ref: ../swagger.yaml#/definitions/error
69       "403":
70         description: Access forbidden
71         schema:
72           $ref: ../swagger.yaml#/definitions/error
73       "500":
74         description: |
75           Internal server error. Possible `error_code` attribute values:
76
77           * `internal_server_error`
78         schema:
79           $ref: ../swagger.yaml#/definitions/error
80       "503":
81         description: Under maintenance
82         schema:
83           $ref: ../swagger.yaml#/definitions/error