• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

noirbizarre / flask-restplus / 749
38%

Build:
DEFAULT BRANCH: master
Ran 11 Aug 2019 05:59AM UTC
Jobs 6
Files 20
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
749

push

travis-ci

SteadBytes
Enable OAuth2 Implicit authentication round-trip (#585)

The swagger-ui project contains a 'oauth2-redirect.html' file
which provides a credential trampoline. Vendor it in, and
place the external url to this file in swagger-ui.html.

The OAuth2 authentication loop is run in a popup window/tab.
The IDP will redirect back to the oauth2RedirectUrl with an
access_token provided in the #hash-fragment of the url.
Javascript running inside 'oauth2-redirect.html' pushes the
access_token back to the parent which created the window/tab,
before closing the tab.

Enables use-case in #544 without adding another config param.

Usage:

```python
app.config.SWAGGER_UI_OAUTH_CLIENT_ID = 'MyClientId'
app.config.SWAGGER_UI_OAUTH_REALM = '-'
app.config.SWAGGER_UI_OAUTH_APP_NAME = 'Demo'
api = Api(
    app,
    title='Demo',
    security={'OAuth2': ['read', 'write']},
    authorizations={
        'OAuth2': {
            'type': 'oauth2',
            'flow': 'implicit',
            'authorizationUrl': 'https://idp.example.com/authorize?audience=https://app.example.com',
            'clientId': app.config.SWAGGER_UI_OAUTH_CLIENT_ID,
            'scopes': {
                'openid': 'Get ID token',
                'profile': 'Get identity',
            }
        }
    }
)
```

2544 of 2625 relevant lines covered (96.91%)

5.79 hits per line

Jobs
ID Job ID Ran Files Coverage
1 749.1 11 Aug 2019 05:59AM UTC 0
96.76
Travis Job 749.1
2 749.2 11 Aug 2019 05:59AM UTC 0
96.53
Travis Job 749.2
3 749.3 11 Aug 2019 05:59AM UTC 0
96.57
Travis Job 749.3
4 749.4 11 Aug 2019 05:59AM UTC 0
96.57
Travis Job 749.4
5 749.5 11 Aug 2019 06:00AM UTC 0
96.8
Travis Job 749.5
6 749.6 11 Aug 2019 06:01AM UTC 0
96.53
Travis Job 749.6
Source Files on build 749
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #749
  • f5c1c275 on github
  • Prev Build on master (#738)
  • Next Build on master (#750)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc