... as discussed in [Issue 507](https://github.com/openstreetmap/operations/issues/507) and described by @mmd-osm. To activate, set the value of `doorkeeper_signing_key` to RSA private key. Allows using openstreetmap as an identity provider. Adds `openid` scope to OAuth2 authorizations, required to login to OSM. Currently, the only claims returned are: - "openid" scope: "sub" and "preferred_username" - "read_email" scope: "email"
40 lines
1.8 KiB
Text
40 lines
1.8 KiB
Text
<% content_for :heading do %>
|
|
<h1><%= t ".title" %></h1>
|
|
<% end %>
|
|
|
|
<p><%= t ".introduction", :application => @pre_auth.client.name %></p>
|
|
|
|
<ul>
|
|
<% @pre_auth.scopes.each do |scope| -%>
|
|
<li><%= t "oauth.scopes.#{scope}" %></li>
|
|
<% end -%>
|
|
</ul>
|
|
|
|
<div class="row justify-content-start g-0 mx-n1">
|
|
<div class="col-auto mx-1">
|
|
<%= bootstrap_form_tag :action => :create do |f| %>
|
|
<%= f.hidden_field :client_id, :value => @pre_auth.client.uid %>
|
|
<%= f.hidden_field :redirect_uri, :value => @pre_auth.redirect_uri %>
|
|
<%= f.hidden_field :state, :value => @pre_auth.state %>
|
|
<%= f.hidden_field :response_type, :value => @pre_auth.response_type %>
|
|
<%= f.hidden_field :scope, :value => @pre_auth.scope %>
|
|
<%= f.hidden_field :nonce, :value => @pre_auth.nonce %>
|
|
<%= f.hidden_field :code_challenge, :value => @pre_auth.code_challenge %>
|
|
<%= f.hidden_field :code_challenge_method, :value => @pre_auth.code_challenge_method %>
|
|
<%= f.primary t(".authorize") %>
|
|
<% end %>
|
|
</div>
|
|
<div class="col-auto mx-1">
|
|
<%= bootstrap_form_tag :action => :destroy, :html => { :method => :delete } do |f| %>
|
|
<%= f.hidden_field :client_id, :value => @pre_auth.client.uid %>
|
|
<%= f.hidden_field :redirect_uri, :value => @pre_auth.redirect_uri %>
|
|
<%= f.hidden_field :state, :value => @pre_auth.state %>
|
|
<%= f.hidden_field :response_type, :value => @pre_auth.response_type %>
|
|
<%= f.hidden_field :scope, :value => @pre_auth.scope %>
|
|
<%= f.hidden_field :nonce, :value => @pre_auth.nonce %>
|
|
<%= f.hidden_field :code_challenge, :value => @pre_auth.code_challenge %>
|
|
<%= f.hidden_field :code_challenge_method, :value => @pre_auth.code_challenge_method %>
|
|
<%= f.submit t(".deny") %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|