* OAuth 2.0 Classes Added Added oauthlib in requirement.txt Added class WebApplicationServer for Authorization code grant and Bearer tokens. Added class OAuthWebRequestValidator for Validating Oauth Request for Web Application * copied code from mnt_oauth needs review * [New] OAuth2 Doctypes and endpoints added Integrations > OAuth Provider Settings Integration Broker > OAuth Bearer Token Integration Broker > OAuth Authorization Code Integration Broker > OAuth Client endpoints for authorize, approve, get_token, revoke_token and test_resource * oauth2.py: renamed skipauth to skip_auth * [Fix] Parse URL instead of storing it in settings * [Fix] get skip_auth from OAuth Provider Settings * Success URL format. Failure URL added. Confirmation dialog layout changed. * Validate access token if passed during use of REST API * OAuth Confirmation colours fixed * Multiple Changes Added links for OAuth under Integrations in Module list. Updated permissions on OAuth doctypes. Updated layout of OAuth Client doctype. * [Docs] Integrations > How to setup OAuth * [Docs] Integration > Using OAuth * [Fix] get_token endpoint must to handle POST request * [Fix] http verbs and responses for OAuth 2.0 Endpoints * [Fix] accept oauth2 access_token from headers * Removed unused imports from api.py
47 lines
No EOL
1.3 KiB
HTML
47 lines
No EOL
1.3 KiB
HTML
{% if not error %}
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title">{{ client_id }} wants to access the following details from your account</h3>
|
|
</div>
|
|
<div class="panel-body">
|
|
<ul class="list-group">
|
|
{% for dtl in details %}
|
|
<li class="list-group-item">{{ dtl.title() }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
<ul class="list-inline">
|
|
<li>
|
|
<button id="allow" class="btn btn-sm btn-primary">Allow</button>
|
|
</li>
|
|
<li>
|
|
<button id="deny" class="btn btn-sm btn-default">Deny</button>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
frappe.ready(function() {
|
|
$('#allow').on('click', function(event) {
|
|
window.location.replace("{{ success_url|string }}");
|
|
});
|
|
$('#deny').on('click', function(event) {
|
|
window.location.replace("{{ failure_url|string }}");
|
|
});
|
|
});
|
|
</script>
|
|
{% else %}
|
|
<div class="panel panel-danger">
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title">Authorization error for {{ client_id }}</h3>
|
|
</div>
|
|
<div class="panel-body">
|
|
<p>An unexpected error occurred while authorizing {{ client_id }}.</p>
|
|
<h4>{{ error }}</h4>
|
|
<ul class="list-inline">
|
|
<li>
|
|
<button class="btn btn-sm btn-default">OK</button>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
{% endif %} |