mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 14:03:27 +00:00
101 lines
4.6 KiB
Twig
101 lines
4.6 KiB
Twig
{% extends "account/base.html.twig" %}
|
|
|
|
{% block title %}
|
|
{% trans "Client application" %}
|
|
{% endblock %}
|
|
|
|
{% set selected = "" %}
|
|
|
|
{% block content_account %}
|
|
<div class="row-fluid">
|
|
<div class="span12">
|
|
<h1>{% trans "Application" %}</h1>
|
|
<input type="hidden" value="{{ application.get_id() }}" name="app_id"/>
|
|
|
|
<div>
|
|
<div><strong><a class="link" href="{{ path("developers_application", {"id" : application.get_id()}) }}">{{ application.get_name() }}</a></strong></div>
|
|
<div>{{ application.get_description() }}</div>
|
|
</div>
|
|
|
|
<h1>{% trans "settings OAuth" %}</h1>
|
|
<p>{% trans "Les parametres oauth de votre application." %}</p>
|
|
|
|
<table id="app-oauth-setting" class="table table-condensed table-bordered">
|
|
<tbody>
|
|
<tr>
|
|
<td>Client ID</td>
|
|
<td>{{ application.get_client_id() }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Client Secret</td>
|
|
<td>{{ application.get_client_secret() }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>{% trans "URL de callback" %}</td>
|
|
{% if application.get_type() == constant("API_OAuth2_Application::DESKTOP_TYPE") %}
|
|
<td>
|
|
<span>{{ application.get_redirect_uri() }}</span>
|
|
</td>
|
|
{% else %}
|
|
<td class="url_callback">
|
|
<span class="url_callback_input">{{ application.get_redirect_uri() }}</span>
|
|
<a href="{{ path("submit_application_callback", {"id" : application.get_id()}) }}" class="save_callback btn btn-small btn-info" style="display:none;">
|
|
{% trans "Save" %}
|
|
</a>
|
|
<button type="button" class="modifier_callback btn btn-small">
|
|
{% trans "Modify" %}
|
|
</button>
|
|
</td>
|
|
{%endif%}
|
|
</tr>
|
|
<tr>
|
|
<td>Authorize endpoint</td>
|
|
<td>{{ app["phraseanet.registry"].get("GV_ServerName") }}api/oauthv2/authorize</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Access endpoint</td>
|
|
<td>{{ app["phraseanet.registry"].get("GV_ServerName") }}api/oauthv2/token</td>
|
|
</tr>
|
|
<tr>
|
|
<td>{% trans "Activer le grant_type de type password pour votre application" %}</td>
|
|
<td>
|
|
<input class="grant-type"
|
|
type="checkbox"
|
|
{{ application.is_password_granted() ? "checked='checked'" : "" }}
|
|
name="grant"
|
|
value="{{ path("submit_developers_application_authorize_grant_password", {"id" : application.get_id()}) }}"
|
|
>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<h1>{% trans "Votre token d\'access" %}</h1>
|
|
<p> {% trans "Les paramétres oauth de votre application." %}</p>
|
|
|
|
<table id="app-access-token-setting table" class="table table-condensed table-bordered">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
{% trans "Token" %}
|
|
</td>
|
|
<td>
|
|
<span id="my_access_token">
|
|
{% if not token is none %}
|
|
{{ token|default("") }}
|
|
{% else %}
|
|
{% trans "Le token n\'a pas encore ete genere" %}
|
|
{% endif %}
|
|
</span>
|
|
<a id="generate_access" href="{{ path("submit_developers_application_token",{ "id" : application.get_id()}) }}" class="btn btn-small btn-info">{% trans "boutton::generer" %}</a>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div>
|
|
<a class="btn btn-primary" href="{{ path("developers_applications") }}">{% trans "boutton::retour" %}</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|