From 9bf15f02695823652a0e783c915b039836f51626 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 5 Mar 2016 21:44:39 +0100 Subject: Add listing clients Rename route to be more consistive (ie: prefixed with developer_) --- .../baggy/Developer/client_parameters.html.twig | 3 +- .../themes/baggy/Developer/howto_app.html.twig | 2 +- .../views/themes/baggy/Developer/index.html.twig | 41 ++++++++++++++++++++-- 3 files changed, 41 insertions(+), 5 deletions(-) (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/baggy') diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client_parameters.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client_parameters.html.twig index a2a28d50..c2f7e95c 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client_parameters.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client_parameters.html.twig @@ -8,14 +8,13 @@

{% trans %}Here are your client parameters.{% endtrans %}

-

{% trans %}Make sure to copy these parameters now. You won’t be able to see them again!{% endtrans %}

  • {% trans %}Client ID:{% endtrans %}
    {{ client_id }}
  • {% trans %}Client secret:{% endtrans %}
    {{ client_secret }}
{% trans %}Back{% endtrans %} - {% trans %}Read the howto "Create my first application"{% endtrans %} + {% trans %}Read the howto "Create my first application"{% endtrans %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/howto_app.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/howto_app.html.twig index 88788776..1aece1d9 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/howto_app.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/howto_app.html.twig @@ -15,7 +15,7 @@

The following commands make use of the HTTPie library. Make sure it is installed on your system before using it.

You need a token to communicate between your 3rd application and wallabag API.

-

To create this token, you need to create a new client.

+

To create this token, you need to create a new client.

Now, create your token (replace client_id, client_secret, username and password with the good values):

http POST http://v2.wallabag.org/oauth/v2/token \
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/index.html.twig
index 87dd4a5f..604bfec9 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/index.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/index.html.twig
@@ -13,15 +13,52 @@
                 

{% trans %}Documentation{% endtrans %}

{% trans %}Clients{% endtrans %}

+

{% trans %}Existing clients{% endtrans %}

+ {% if clients %} +
    + {% for client in clients %} +
  • +
    #{{ client.id }}
    +
    + + + + + + + + + + + + + + + + + +
    {% trans %}Client ID:{% endtrans %}{{ client.id }}_{{ client.randomId }}
    {% trans %}Client secret:{% endtrans %}{{ client.secret }}
    {% trans %}Redirect URIs:{% endtrans %}{{ client.redirectUris|json_encode() }}
    {% trans %}Grant type allowed:{% endtrans %}{{ client.allowedGrantTypes|json_encode() }}
    +

    + {% trans %}You have the ability to remove this client. This action is IRREVERSIBLE !{% endtrans %}
    + {% trans %}If you remove it, every app configured with that client won't be able to auth on your wallabag.{% endtrans %}
    + {% trans %}Remove this client{% endtrans %} +

    +
    +
  • + {% endfor %} +
+ {% else %} + {% trans %}No client yet.{% endtrans %} + {% endif %}
-- cgit v1.2.3