<!doctype html>
<html lang="en-US">
<head>
	<title>Swagger UI: OAuth2 Redirect</title>
</head>
<body>
<script>
	'use strict';

	function run() {
		var oauth2 = window.opener.swaggerUIRedirectOauth2;
		var sentState = oauth2.state;
		var redirectUrl = oauth2.redirectUrl;
		var isValid, qp, arr;

		if (/code|token|error/.test(window.location.hash)) {
			qp = window.location.hash.substring(1);
		} else {
			qp = location.search.substring(1);
		}

		arr = qp.split("&");
		arr.forEach(function (v, i, _arr) {
			