This repository has been archived by the owner on Mar 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfederation_proxy.yaml
92 lines (92 loc) · 2.9 KB
/
federation_proxy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
swagger: '2.0'
info:
title: Swagger Sample App
description: This is a sample server Petstore server.
version: 1.0.1
paths:
/:
get:
summary: federation
description: |
Proxy federation endpoint and add CORS headers
consumes:
- application/json
produces:
- application/json
tags:
- CORS
parameters:
- name: SessionDuration
in: query
description: Session
required: true
type: int10
- name: Session
in: query
description: Session
required: true
type: string
x-amazon-apigateway-integration:
type: http
httpMethod: GET
uri: https://signin.aws.amazon.com/federation
passthroughBehavior: when_no_templates
requestParameters:
integration.request.querystring.Action: "'getSigninToken'"
integration.request.querystring.SessionDuration: "method.request.querystring.SessionDuration"
integration.request.querystring.Session: "method.request.querystring.Session"
responses:
"default":
statusCode: "200"
responseParameters:
method.response.header.Access-Control-Allow-Headers : "'Content-Type,X-Amz-Date,Authorization,X-Api-Key'"
method.response.header.Access-Control-Allow-Methods : "'GET,OPTIONS'"
method.response.header.Access-Control-Allow-Origin : "'*'"
responses:
200:
description: Default response for CORS method
headers:
Access-Control-Allow-Headers:
type: "string"
Access-Control-Allow-Methods:
type: "string"
Access-Control-Allow-Origin:
type: "string"
options:
summary: CORS support
description: |
Enable CORS by returning correct headers
consumes:
- application/json
produces:
- application/json
tags:
- CORS
x-amazon-apigateway-integration:
type: mock
requestTemplates:
application/json: |
{
"statusCode" : 200
}
responses:
"default":
statusCode: "200"
responseParameters:
method.response.header.Access-Control-Allow-Headers : "'Content-Type,X-Amz-Date,Authorization,X-Api-Key'"
method.response.header.Access-Control-Allow-Methods : "'*'"
method.response.header.Access-Control-Allow-Origin : "'*'"
responseTemplates:
application/json: |
{}
responses:
200:
description: Default response for CORS method
headers:
Access-Control-Allow-Headers:
type: "string"
Access-Control-Allow-Methods:
type: "string"
Access-Control-Allow-Origin:
type: "string"