Skip to content

Commit b9b6e65

Browse files
committed
add oauth
1 parent fd2d794 commit b9b6e65

25 files changed

+279
-100
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ Bandwidth.configure do |config|
8585
config.password = 'YOUR_PASSWORD'
8686
# Configure faraday connection
8787
config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
88+
89+
# Configure OAuth2 access token for authorization: OAuth2
90+
config.access_token = 'YOUR ACCESS TOKEN'
91+
# Configure a proc to get access tokens in lieu of the static access_token configuration
92+
config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' }
93+
# Configure faraday connection
94+
config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
8895
end
8996

9097
api_instance = Bandwidth::CallsApi.new
@@ -345,3 +352,11 @@ Authentication schemes defined for the API:
345352

346353
- **Type**: HTTP basic authentication
347354

355+
### OAuth2
356+
357+
358+
- **Type**: OAuth
359+
- **Flow**: application
360+
- **Authorization URL**:
361+
- **Scopes**: N/A
362+

bandwidth.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ info:
99
version: 1.0.0
1010
security:
1111
- Basic: []
12+
- OAuth2: []
1213
tags:
1314
- name: Messages
1415
- name: Media
@@ -8427,6 +8428,12 @@ components:
84278428
84288429
84298430
- Example: `Authorization: Basic ZGVtbZpwQDU1dzByZA==`
8431+
OAuth2:
8432+
type: oauth2
8433+
flows:
8434+
clientCredentials:
8435+
tokenUrl: https://api.bandwidth.com/api/v1/oauth2/token
8436+
scopes: {}
84308437
callbacks:
84318438
inboundCallback:
84328439
'{inboundCallbackUrl}':

docs/CallsApi.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ Bandwidth.configure do |config|
2929
# Configure HTTP basic authorization: Basic
3030
config.username = 'YOUR USERNAME'
3131
config.password = 'YOUR PASSWORD'
32+
33+
# Configure OAuth2 access token for authorization: OAuth2
34+
config.access_token = 'YOUR ACCESS TOKEN'
3235
end
3336

3437
api_instance = Bandwidth::CallsApi.new
@@ -75,7 +78,7 @@ end
7578

7679
### Authorization
7780

78-
[Basic](../README.md#Basic)
81+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
7982

8083
### HTTP request headers
8184

@@ -101,6 +104,9 @@ Bandwidth.configure do |config|
101104
# Configure HTTP basic authorization: Basic
102105
config.username = 'YOUR USERNAME'
103106
config.password = 'YOUR PASSWORD'
107+
108+
# Configure OAuth2 access token for authorization: OAuth2
109+
config.access_token = 'YOUR ACCESS TOKEN'
104110
end
105111

106112
api_instance = Bandwidth::CallsApi.new
@@ -147,7 +153,7 @@ end
147153

148154
### Authorization
149155

150-
[Basic](../README.md#Basic)
156+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
151157

152158
### HTTP request headers
153159

@@ -173,6 +179,9 @@ Bandwidth.configure do |config|
173179
# Configure HTTP basic authorization: Basic
174180
config.username = 'YOUR USERNAME'
175181
config.password = 'YOUR PASSWORD'
182+
183+
# Configure OAuth2 access token for authorization: OAuth2
184+
config.access_token = 'YOUR ACCESS TOKEN'
176185
end
177186

178187
api_instance = Bandwidth::CallsApi.new
@@ -233,7 +242,7 @@ end
233242

234243
### Authorization
235244

236-
[Basic](../README.md#Basic)
245+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
237246

238247
### HTTP request headers
239248

@@ -259,6 +268,9 @@ Bandwidth.configure do |config|
259268
# Configure HTTP basic authorization: Basic
260269
config.username = 'YOUR USERNAME'
261270
config.password = 'YOUR PASSWORD'
271+
272+
# Configure OAuth2 access token for authorization: OAuth2
273+
config.access_token = 'YOUR ACCESS TOKEN'
262274
end
263275

264276
api_instance = Bandwidth::CallsApi.new
@@ -306,7 +318,7 @@ nil (empty response body)
306318

307319
### Authorization
308320

309-
[Basic](../README.md#Basic)
321+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
310322

311323
### HTTP request headers
312324

@@ -332,6 +344,9 @@ Bandwidth.configure do |config|
332344
# Configure HTTP basic authorization: Basic
333345
config.username = 'YOUR USERNAME'
334346
config.password = 'YOUR PASSWORD'
347+
348+
# Configure OAuth2 access token for authorization: OAuth2
349+
config.access_token = 'YOUR ACCESS TOKEN'
335350
end
336351

337352
api_instance = Bandwidth::CallsApi.new
@@ -382,7 +397,7 @@ nil (empty response body)
382397

383398
### Authorization
384399

385-
[Basic](../README.md#Basic)
400+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
386401

387402
### HTTP request headers
388403

docs/ConferencesApi.md

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ Bandwidth.configure do |config|
3333
# Configure HTTP basic authorization: Basic
3434
config.username = 'YOUR USERNAME'
3535
config.password = 'YOUR PASSWORD'
36+
37+
# Configure OAuth2 access token for authorization: OAuth2
38+
config.access_token = 'YOUR ACCESS TOKEN'
3639
end
3740

3841
api_instance = Bandwidth::ConferencesApi.new
@@ -81,7 +84,7 @@ end
8184

8285
### Authorization
8386

84-
[Basic](../README.md#Basic)
87+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
8588

8689
### HTTP request headers
8790

@@ -107,6 +110,9 @@ Bandwidth.configure do |config|
107110
# Configure HTTP basic authorization: Basic
108111
config.username = 'YOUR USERNAME'
109112
config.password = 'YOUR PASSWORD'
113+
114+
# Configure OAuth2 access token for authorization: OAuth2
115+
config.access_token = 'YOUR ACCESS TOKEN'
110116
end
111117

112118
api_instance = Bandwidth::ConferencesApi.new
@@ -153,7 +159,7 @@ end
153159

154160
### Authorization
155161

156-
[Basic](../README.md#Basic)
162+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
157163

158164
### HTTP request headers
159165

@@ -179,6 +185,9 @@ Bandwidth.configure do |config|
179185
# Configure HTTP basic authorization: Basic
180186
config.username = 'YOUR USERNAME'
181187
config.password = 'YOUR PASSWORD'
188+
189+
# Configure OAuth2 access token for authorization: OAuth2
190+
config.access_token = 'YOUR ACCESS TOKEN'
182191
end
183192

184193
api_instance = Bandwidth::ConferencesApi.new
@@ -227,7 +236,7 @@ end
227236

228237
### Authorization
229238

230-
[Basic](../README.md#Basic)
239+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
231240

232241
### HTTP request headers
233242

@@ -253,6 +262,9 @@ Bandwidth.configure do |config|
253262
# Configure HTTP basic authorization: Basic
254263
config.username = 'YOUR USERNAME'
255264
config.password = 'YOUR PASSWORD'
265+
266+
# Configure OAuth2 access token for authorization: OAuth2
267+
config.access_token = 'YOUR ACCESS TOKEN'
256268
end
257269

258270
api_instance = Bandwidth::ConferencesApi.new
@@ -301,7 +313,7 @@ end
301313

302314
### Authorization
303315

304-
[Basic](../README.md#Basic)
316+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
305317

306318
### HTTP request headers
307319

@@ -327,6 +339,9 @@ Bandwidth.configure do |config|
327339
# Configure HTTP basic authorization: Basic
328340
config.username = 'YOUR USERNAME'
329341
config.password = 'YOUR PASSWORD'
342+
343+
# Configure OAuth2 access token for authorization: OAuth2
344+
config.access_token = 'YOUR ACCESS TOKEN'
330345
end
331346

332347
api_instance = Bandwidth::ConferencesApi.new
@@ -373,7 +388,7 @@ end
373388

374389
### Authorization
375390

376-
[Basic](../README.md#Basic)
391+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
377392

378393
### HTTP request headers
379394

@@ -399,6 +414,9 @@ Bandwidth.configure do |config|
399414
# Configure HTTP basic authorization: Basic
400415
config.username = 'YOUR USERNAME'
401416
config.password = 'YOUR PASSWORD'
417+
418+
# Configure OAuth2 access token for authorization: OAuth2
419+
config.access_token = 'YOUR ACCESS TOKEN'
402420
end
403421

404422
api_instance = Bandwidth::ConferencesApi.new
@@ -455,7 +473,7 @@ end
455473

456474
### Authorization
457475

458-
[Basic](../README.md#Basic)
476+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
459477

460478
### HTTP request headers
461479

@@ -481,6 +499,9 @@ Bandwidth.configure do |config|
481499
# Configure HTTP basic authorization: Basic
482500
config.username = 'YOUR USERNAME'
483501
config.password = 'YOUR PASSWORD'
502+
503+
# Configure OAuth2 access token for authorization: OAuth2
504+
config.access_token = 'YOUR ACCESS TOKEN'
484505
end
485506

486507
api_instance = Bandwidth::ConferencesApi.new
@@ -528,7 +549,7 @@ nil (empty response body)
528549

529550
### Authorization
530551

531-
[Basic](../README.md#Basic)
552+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
532553

533554
### HTTP request headers
534555

@@ -554,6 +575,9 @@ Bandwidth.configure do |config|
554575
# Configure HTTP basic authorization: Basic
555576
config.username = 'YOUR USERNAME'
556577
config.password = 'YOUR PASSWORD'
578+
579+
# Configure OAuth2 access token for authorization: OAuth2
580+
config.access_token = 'YOUR ACCESS TOKEN'
557581
end
558582

559583
api_instance = Bandwidth::ConferencesApi.new
@@ -604,7 +628,7 @@ nil (empty response body)
604628

605629
### Authorization
606630

607-
[Basic](../README.md#Basic)
631+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
608632

609633
### HTTP request headers
610634

@@ -630,6 +654,9 @@ Bandwidth.configure do |config|
630654
# Configure HTTP basic authorization: Basic
631655
config.username = 'YOUR USERNAME'
632656
config.password = 'YOUR PASSWORD'
657+
658+
# Configure OAuth2 access token for authorization: OAuth2
659+
config.access_token = 'YOUR ACCESS TOKEN'
633660
end
634661

635662
api_instance = Bandwidth::ConferencesApi.new
@@ -679,7 +706,7 @@ nil (empty response body)
679706

680707
### Authorization
681708

682-
[Basic](../README.md#Basic)
709+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
683710

684711
### HTTP request headers
685712

docs/MFAApi.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ Bandwidth.configure do |config|
2727
# Configure HTTP basic authorization: Basic
2828
config.username = 'YOUR USERNAME'
2929
config.password = 'YOUR PASSWORD'
30+
31+
# Configure OAuth2 access token for authorization: OAuth2
32+
config.access_token = 'YOUR ACCESS TOKEN'
3033
end
3134

3235
api_instance = Bandwidth::MFAApi.new
@@ -73,7 +76,7 @@ end
7376

7477
### Authorization
7578

76-
[Basic](../README.md#Basic)
79+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
7780

7881
### HTTP request headers
7982

@@ -99,6 +102,9 @@ Bandwidth.configure do |config|
99102
# Configure HTTP basic authorization: Basic
100103
config.username = 'YOUR USERNAME'
101104
config.password = 'YOUR PASSWORD'
105+
106+
# Configure OAuth2 access token for authorization: OAuth2
107+
config.access_token = 'YOUR ACCESS TOKEN'
102108
end
103109

104110
api_instance = Bandwidth::MFAApi.new
@@ -145,7 +151,7 @@ end
145151

146152
### Authorization
147153

148-
[Basic](../README.md#Basic)
154+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
149155

150156
### HTTP request headers
151157

@@ -171,6 +177,9 @@ Bandwidth.configure do |config|
171177
# Configure HTTP basic authorization: Basic
172178
config.username = 'YOUR USERNAME'
173179
config.password = 'YOUR PASSWORD'
180+
181+
# Configure OAuth2 access token for authorization: OAuth2
182+
config.access_token = 'YOUR ACCESS TOKEN'
174183
end
175184

176185
api_instance = Bandwidth::MFAApi.new
@@ -217,7 +226,7 @@ end
217226

218227
### Authorization
219228

220-
[Basic](../README.md#Basic)
229+
[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
221230

222231
### HTTP request headers
223232

0 commit comments

Comments
 (0)