Sha256: 882d276a65bc68342ea942f587b10938e5036d18bc8ccf555e78803c4d70236b

Contents?: true

Size: 1.15 KB

Versions: 1

Compression:

Stored size: 1.15 KB

Contents

Doorkeeper::OpenidConnect.configure do
  issuer 'issuer string'

  jws_private_key <<-EOL
-----BEGIN RSA PRIVATE KEY-----
....
-----END RSA PRIVATE KEY-----
EOL

  jws_public_key <<-EOL
-----BEGIN RSA PUBLIC KEY-----
....
-----END RSA PUBLIC KEY-----
EOL

  resource_owner_from_access_token do |access_token|
    # Example implementation:
    # User.find_by(id: access_token.resource_owner_id)
  end

  auth_time_from_resource_owner do |resource_owner|
    # Example implementation:
    # resource_owner.current_sign_in_at
  end

  reauthenticate_resource_owner do |resource_owner|
    # Example implementation:
    # store_location_for resource_owner, request.fullpath
    # sign_out resource_owner
    # redirect_to new_user_session_url
  end

  subject do |resource_owner|
    # Example implementation:
    # resource_owner.key
  end

  # Expiration time on or after which the ID Token MUST NOT be accepted for processing. (default 120 seconds).
  # expiration 600

  # Example claims:
  # claims do
  #   normal_claim :_foo_ do |resource_owner|
  #     resource_owner.foo
  #   end

  #   normal_claim :_bar_ do |resource_owner|
  #     resource_owner.bar
  #   end
  # end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
doorkeeper-openid_connect-1.1.0 lib/generators/doorkeeper/openid_connect/templates/initializer.rb