From 0f8268c93e6210d368f9dcd1900274871a9eacdf Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sun, 30 Apr 2017 09:16:55 +0200 Subject: Add client_credentials as grant_type Therefore, username and password are no longer needed Signed-off-by: Thomas Citharel Allow to have global clients, auth through direct token or auth code and bring scopes Signed-off-by: Thomas Citharel fix review Signed-off-by: Thomas Citharel remove redirect uri requirement on specific clients add back password and depreciate it enforce state Signed-off-by: Thomas Citharel Allow apps to register themselves A handful of changes Signed-off-by: Thomas Citharel change timeout values Signed-off-by: Thomas Citharel set access_token lifetime to 1 year and double for refresh_token Signed-off-by: Thomas Citharel --- .../views/Authorize/authorize_content.html.twig | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 app/Resources/FOSOAuthServerBundle/views/Authorize/authorize_content.html.twig (limited to 'app/Resources/FOSOAuthServerBundle/views/Authorize/authorize_content.html.twig') diff --git a/app/Resources/FOSOAuthServerBundle/views/Authorize/authorize_content.html.twig b/app/Resources/FOSOAuthServerBundle/views/Authorize/authorize_content.html.twig new file mode 100644 index 00000000..d7f2dbe0 --- /dev/null +++ b/app/Resources/FOSOAuthServerBundle/views/Authorize/authorize_content.html.twig @@ -0,0 +1,53 @@ +
+
+

A new application would like to connect to your account

+ +
+
+
    +
  • + {% if client.image %} + Client icon + {% endif %} + {{ client.name }} +

    {{ client.description }}

    +
  • +
+ {% set scopes = form.scope.vars.value | split(' ') %} + {# TODO : Fix me when https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/issues/309 is ok #} +
    + {% for scope in scopes %} + {% if scope == 'read' %} +
  • +
    visibilityRead Permission
    +
    {{ client.name }} will be able to access the list and contents of your entries, tags and annotations.
    +
  • + {% endif %} + {% if scope == 'write' %} +
  • +
    editEdit Permission
    +
    {{ client.name }} will be able to edit and manage (including deleting) your entries, tags and annotations.
    +
  • + {% endif %} + {% if scope == 'user' %} +
  • +
    personUser Permission
    +
    {{ client.name }} will be able to manage your user account.
    +
  • + {% endif %} + {% endfor %} +
+
+ {{ form_start(form, {'method': 'POST', 'action': path('fos_oauth_server_authorize'), 'label_attr': {'class': 'fos_oauth_server_authorize'} }) }} + + + {{ form_row(form.client_id) }} + {{ form_row(form.response_type) }} + {{ form_row(form.redirect_uri) }} + {{ form_row(form.state) }} + {{ form_row(form.scope) }} + {{ form_rest(form) }} + +
+
+
-- cgit v1.2.3