0

Newbee 到 Red hat Quay,试图从 Postman 生成访问令牌

我在 Quay 中配置了应用程序。

在此处输入图像描述

我正在尝试生成一个令牌形式的邮递员

我正在调用以下 URL:

http://<ip>/oauth/authorize?client_id=MV69TK1LD94CCT1I6QR5&redirect_uri=http://<ip>/&scope=repo:read

而不是令牌获取此请求的 html。

<!DOCTYPE html>
<html ng-app="quay" class="onprem">

<head>
	<base href="/">


	<title>Authorize Quay-HA-App-Token · Quay</title>






	<meta name="viewport" content="width=device-width, initial-scale=1.0">


	<link rel="stylesheet" href="/static/ldn/font-awesome.css-a166e3c966c6.css" type="text/css">

	<link rel="stylesheet" href="/static/ldn/bootstrap.min.css-13f668494557.css" type="text/css">

	<link rel="stylesheet" href="/static/ldn/cssfamilySourceSansPro300400700-30cd793a4b9b.css" type="text/css">

	<link rel="stylesheet" href="/static/ldn/core-icons.css-d500848fee49.css" type="text/css">

	<link rel="stylesheet" href="/static/ldn/bootstrap-datetimepicker.min.css-4b15a4ede750.css" type="text/css">

	<link rel="stylesheet" href="/static/ldn/cal-heatmap.css-904c3b9e8a60.css" type="text/css">

	<link rel="stylesheet" href="/static/ldn/ng-tags-input.min.css-7782190f81cd.css" type="text/css">


	<!-- Icons -->
	<link rel="shortcut icon" href="/static/img/quay_favicon.png" type="image/png" />
	<!-- /Icons -->

</head>

<body ng-class="pageClass + ' ' + (user.anonymous ? 'anon' : 'signedin')" class="co-img-bg-network">
	<div id="co-l-footer-wrapper">
		<nav class="navbar navbar-default header-bar co-m-navbar co-fx-box-shadow" role="navigation"></nav>

		<div class="quay-message-bar"></div>
		<div quay-require="['BILLING']">
			<div class="quay-service-status-bar"></div>
		</div>

		<div id="padding-container">
			<div id="co-l-view-container">
				<div ng-class="newLayout ? '' : 'main-panel co-fx-box-shadow-heavy'">

					<div class="container" ng-if="user.anonymous">
						<div class="col-sm-6 col-sm-offset-3">
							<div class="user-setup"></div>
						</div>
					</div>

					<div class="container auth-container" ng-if="!user.anonymous">
						<div class="auth-header">
							<span class="avatar" size="48" data="{&#34;color&#34;: &#34;#f7b6d2&#34;, &#34;kind&#34;: &#34;app&#34;, &#34;hash&#34;: &#34;4deba2034a1b248c5a1390bacf85e838&#34;, &#34;name&#34;: &#34;Quay-HA-App-Token&#34;}"></span>
							<h2><a href="http://<ip>/" ng-safenewtab>Quay-HA-App-Token</a></h2>
							<h4>
								<span class="avatar" size="24" data="{&#34;color&#34;: &#34;#f7b6d2&#34;, &#34;kind&#34;: &#34;org&#34;, &#34;hash&#34;: &#34;4deba2034a1b248c5a1390bacf85e838&#34;, &#34;name&#34;: &#34;resiliencyorchestration&#34;}"
              style="vertical-align: middle; margin-right: 4px;"></span>
								<span style="vertical-align: middle">resiliencyorchestration</span>
							</h4>
						</div>

						<div class="auth-scopes">
							<div class="reason">This application would like permission to:</div>
							<div class="panel-group">

								<div class="scope panel panel-default  dangerous ">
									<div class="panel-heading">
										<h4 class="panel-title">
											<div class="title-container">
												<div class="title " data-toggle="collapse" data-parent="#scopeGroup"
													data-target="#description-0">
													<i class="fa arrow"></i>
													<i class="fa fa-gear fa-lg"></i>
													<a data-toggle="collapse" href="#collapseOne">
														Administer Organization
													</a>


													<i class="fa fa-lg fa-exclamation-triangle"
                         data-title="This scope grants permissions which are potentially dangerous. Be careful when authorizing it!"
                         data-container="body" bs-tooltip></i>

												</div>
											</div>
										</h4>
									</div>
									<div id="description-0" class="panel-collapse  in ">
										<div class="panel-body">

											<div class="alert alert-warning">This scope grants permissions which are
												potentially dangerous. Be careful when authorizing it!</div>


											This application will be able to administer your organizations including
											creating robots, creating teams, adjusting team membership, and changing
											billing settings. You should have absolute trust in the requesting
											application before granting this permission.
										</div>
									</div>
								</div>

							</div>
						</div>

						<div class="button-bar">

							<button type="button" class="btn btn-warning" onclick="$('#confirmAuthorizeModal').modal()">Authorize Application</button>

							<form method="post" action="/oauth/denyapp">
								<input type="hidden" name="client_id" value="MV69TK1LD94CCT1I6QR5">
								<input type="hidden" name="redirect_uri" value="http://<ip>/">
								<input type="hidden" name="scope" value="org:admin">
								<input type="hidden" name="_csrf_token" value="iI1k4xtfDfu5SfnV4q6yjE+msnP6Kqt+/C1fx4q9+9cMgurxcq4nKNBEF6EnpiAK">
								<button type="submit" class="btn btn-default">Cancel</button>
							</form>
						</div>
					</div>


					<!-- Modal message dialog -->
					<div class="modal fade" id="confirmAuthorizeModal">
						<div class="modal-dialog">
							<div class="modal-content">
								<div class="modal-header">
									<h4 class="modal-title">Confirm Authorization</h4>
								</div>
								<div class="modal-body">
									The application <strong>Quay-HA-App-Token</strong> is requesting permission to
									perform actions which are potentially dangerous.
									<br><br>
          Are you sure you want to authorize this application?
        </div>
									<div class="modal-footer">
										<form method="post" action="/oauth/authorizeapp" style="display: inline-block">
											<input type="hidden" name="client_id" value="MV69TK1LD94CCT1I6QR5">
											<input type="hidden" name="redirect_uri" value="http://<ip>/">
											<input type="hidden" name="scope" value="org:admin">
											<input type="hidden" name="_csrf_token" value="iI1k4xtfDfu5SfnV4q6yjE+msnP6Kqt+/C1fx4q9+9cMgurxcq4nKNBEF6EnpiAK">
											<button type="submit" class="btn btn-success">Authorize Application</button>
										</form>
										<form method="post" action="/oauth/denyapp" style="display: inline-block">
											<input type="hidden" name="client_id" value="MV69TK1LD94CCT1I6QR5">
											<input type="hidden" name="redirect_uri" value="http://<ip>/">
											<input type="hidden" name="scope" value="org:admin">
											<input type="hidden" name="_csrf_token" value="iI1k4xtfDfu5SfnV4q6yjE+msnP6Kqt+/C1fx4q9+9cMgurxcq4nKNBEF6EnpiAK">
											<button type="submit" class="btn btn-default">Deny</button>
										</form>
									</div>
								</div><!-- /.modal-content -->
							</div><!-- /.modal-dialog -->
						</div><!-- /.modal -->



					</div>
				</div>
			</div>

			<div id="co-l-footer-push"></div>
		</div>

		<nav id="co-l-footer" class="page-footer hidden-xs">
			<div class="col-md-12">
				<ul>

					<li><a href="https://redhat.com" ng-safenewtab><img src="/static/img/RedHat.svg"></a></li>

					<li quay-require="['BILLING']"><a href="https://docs.quay.io" ng-safenewtab>Documentation</a></li>
					<li quay-require="['BILLING']"><a href="/tos" target="_self">Terms</a></li>
					<li quay-require="['BILLING']"><a href="/privacy" target="_self">Privacy</a></li>
					<li quay-require="['BILLING']"><a href="/security/" target="_self">Security</a></li>
					<li quay-require="['BILLING']"><a href="/about/" target="_self">About</a></li>

					<li quay-require="['BILLING']">
						<span class="quay-service-status"></span>
					</li>
					<li>Quay v3.2.1</li>
				</ul>
			</div>
		</nav>

		<!-- Modal message dialog -->
		<div class="modal fade" id="couldnotloadModal" data-backdrop="static">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<h4 class="modal-title">Uh Oh...</h4>
					</div>
					<div class="modal-body">
						Something went wrong when trying to load Quay! Please report this to <a
							href="mailto:support@quay.io">support@quay.io</a>.
					</div>
					<div class="modal-footer">
					</div>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->



		<div class="angular-tour-ui" inline="false" tour="angular_tour_current"></div>
</body>

</html>

请帮忙。如果需要任何细节,请告诉我。如果需要任何细节,请告诉我。如果需要任何细节,请告诉我。如果需要任何细节,请告诉我。

4

1 回答 1

0

下面解决了我的问题。我能够在浏览器中看到为此 URL 生成的访问令牌。

http://quayadmin:Welcome@12345 $@/oauth/authorize?client_id=MV69TK1LD94CCT1I6QR5&redirect_uri= http://internal/&scope=repo:read&response_type=token&realm=realm

在此处输入图像描述

于 2020-05-22T08:07:01.113 回答