{# -*- coding: utf-8 -*- This file is part of Invenio. Copyright (C) 2015-2020 CERN. Copyright (C) 2021 Graz University of Technology. Invenio is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. #} {%- extends "invenio_oauth2server/settings/index.html" %} {%- import "invenio_oauth2server/settings/helpers.html" as helpers with context %} {%- from "invenio_oauth2server/settings/_macros.html" import render_field with context %} {% block settings_content %} {{ helpers.panel_start( _('Application / %(client_name)s', client_name=client.name), with_body=False, ) }}

{{ _('Client ID') }}
{{ client.client_id }}

{{ _('Client Secret') }}
{{ client.client_secret }}
{{ _('Do not share the client secret with anyone!') }}

{%- block client_footer_text %}{%- endblock client_footer_text %}
{%- for field in form %} {{ render_field(field) }} {%- endfor %}
{{helpers.panel_end(with_body=False)}} {{helpers.panel_start(_('OAuth 2.0 Endpoints'))}}

{{ _('Authorize URL (GET)') }}
{{ url_for('invenio_oauth2server.authorize', _external=True, _scheme='https')}}

{{ _('Query parameters') }} ( {{_('example request')}} ):
  • response_type ({{ _("required, use") }} code {{ _("or") }} token)
  • client_id ({{ _("required") }})
  • scope ({{ _("required, space separate list of scopes") }})
  • redirect_uri ({{ _("required, URL encoded") }})
  • state ({{ _("recommended, for CSRF protection") }})

{{ _('Access token URL (POST)') }}
{{ url_for('invenio_oauth2server.access_token', _external=True, _scheme='https')}}

{{ _('Request body parameters:') }}
  • client_id ({{ _("required") }}).
  • client_secret ({{ _("required") }}).
  • grant_type ({{ _("required, use") }} {% for c in config.OAUTH2SERVER_ALLOWED_GRANT_TYPES %}{{c}}{% if not loop.last %}, {% endif %}{% endfor %}).
  • code ({{ _("required for grant_type") }} authorization code).
  • scope ({{ _("required for grant_type") }} client_credentials).
  • refresh_token ({{ _("required for grant_type") }} refresh_token).

{{helpers.panel_end()}} {% endblock settings_content %}