Add OIDC capability

This commit is contained in:
Dan Milne
2025-10-23 20:04:46 +11:00
parent d480d7dd0a
commit 91573ee2b9
5 changed files with 16 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
class OidcController < ApplicationController
# Discovery and JWKS endpoints are public
allow_unauthenticated_access only: [:discovery, :jwks, :token]
allow_unauthenticated_access only: [:discovery, :jwks, :token, :userinfo]
skip_before_action :verify_authenticity_token, only: [:token]
# GET /.well-known/openid-configuration

View File

@@ -15,7 +15,7 @@ class OidcAuthorizationCode < ApplicationRecord
expires_at <= Time.current
end
def valid?
def usable?
!used? && !expired?
end