{# -*- coding: utf-8 -*- This file is part of Invenio. Copyright (C) 2015-2020 CERN. 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 %}