Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
bodnia committed Jun 8, 2017
1 parent e7975e7 commit 36b263e
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 72 deletions.
6 changes: 3 additions & 3 deletions dist/oauth2-redirect.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
function run () {
var oauth2 = window.opener.swaggerUIRedirectOauth2;
var sentState = oauth2.state;
var redirectUrl = oauth2.redirectUrl;
var isValid, qp, arr;

qp = (window.location.hash || location.search).substring(1);
Expand Down Expand Up @@ -35,7 +36,7 @@
if (qp.code) {
delete oauth2.state;
oauth2.auth.code = qp.code;
oauth2.callback(oauth2.auth);
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
} else {
oauth2.errCb({
authId: oauth2.auth.name,
Expand All @@ -45,9 +46,8 @@
});
}
} else {
oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid});
oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
}
window.close();
}

</script>
98 changes: 49 additions & 49 deletions dist/swagger-ui-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-bundle.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions dist/swagger-ui-standalone-preset.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-standalone-preset.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/swagger-ui.css

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions dist/swagger-ui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/core/components/auth/oauth2.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,13 @@ export default class Oauth2 extends React.Component {
let isAuthorized = !!authorizedAuth
let errors = errSelectors.allErrors().filter( err => err.get("authId") === name)
let isValid = !errors.filter( err => err.get("source") === "validation").size
let description = schema.get("description")

return (
<div>
<h4>OAuth2.0 <JumpToPath path={[ "securityDefinitions", name ]} /></h4>
{ !this.state.appName ? null : <h5>Application: { this.state.appName } </h5> }
<Markdown source={ schema.get("description") } />
{ description && <Markdown source={ schema.get("description") } /> }

{ isAuthorized && <h6>Authorized</h6> }

Expand Down
1 change: 0 additions & 1 deletion src/core/plugins/auth/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ export const authorizeRequest = ( data ) => ( { fn, authActions, errActions, aut

let _headers = Object.assign({
"Accept":"application/json, text/plain, */*",
"Access-Control-Allow-Origin": "*",
"Content-Type": "application/x-www-form-urlencoded"
}, headers)

Expand Down

0 comments on commit 36b263e

Please sign in to comment.