module Rodauth::InternalRequestMethods

  1. lib/rodauth/features/internal_request.rb

Public Instance Aliases

change_login_requires_password? -> modifications_require_password?
change_password_requires_password? -> modifications_require_password?
close_account_requires_password? -> modifications_require_password?
require_login_confirmation? -> modifications_require_password?
require_password_confirmation? -> modifications_require_password?
set_notice_now_flash -> set_notice_flash
set_redirect_error_flash -> set_error_flash
two_factor_modifications_require_password? -> modifications_require_password?

Attributes

Public Instance methods

add_recovery_codes_view()
[show source]
   # File lib/rodauth/features/internal_request.rb
88 def add_recovery_codes_view
89   _return_from_internal_request(recovery_codes)
90 end
clear_session()
[show source]
   # File lib/rodauth/features/internal_request.rb
53 def clear_session
54   @session.clear
55 end
domain()
[show source]
   # File lib/rodauth/features/internal_request.rb
41 def domain
42   d = super
43   if d.nil? || d == INVALID_DOMAIN
44     raise InternalRequestError, "must set domain in configuration, as it cannot be determined from internal request"
45   end
46   d
47 end
handle_internal_request(meth)
[show source]
    # File lib/rodauth/features/internal_request.rb
110 def handle_internal_request(meth)
111   catch(:halt) do
112     _around_rodauth do
113       before_rodauth
114       send(meth, request)
115     end
116   end
117 
118   @internal_request_return_value
119 end
modifications_require_password?()
[show source]
   # File lib/rodauth/features/internal_request.rb
68 def modifications_require_password?
69   false
70 end
only_json?()
[show source]
    # File lib/rodauth/features/internal_request.rb
121 def only_json?
122   false
123 end
otp_setup_view()
[show source]
   # File lib/rodauth/features/internal_request.rb
82 def otp_setup_view
83   hash = {:otp_setup=>otp_user_key}
84   hash[:otp_setup_raw] = otp_key if hmac_secret
85   _return_from_internal_request(hash)
86 end
raw_param(k)
[show source]
   # File lib/rodauth/features/internal_request.rb
49 def raw_param(k)
50   @params[k]
51 end
set_error_flash(message)
[show source]
   # File lib/rodauth/features/internal_request.rb
57 def set_error_flash(message)
58   @flash = message
59   _handle_internal_request_error
60 end
set_notice_flash(message)
[show source]
   # File lib/rodauth/features/internal_request.rb
63 def set_notice_flash(message)
64   @flash = message
65 end
webauthn_auth_view()
[show source]
    # File lib/rodauth/features/internal_request.rb
101 def webauthn_auth_view
102   cred = webauthn_credential_options_for_get
103   _return_from_internal_request({
104     webauthn_auth: cred.as_json,
105     webauthn_auth_challenge: cred.challenge,
106     webauthn_auth_challenge_hmac: webauthn_credential_challenge_hmac(cred.challenge)
107   })
108 end
webauthn_credential_challenge_hmac_match?(hmac)
[show source]
   # File lib/rodauth/features/internal_request.rb
78 def webauthn_credential_challenge_hmac_match?(hmac)
79   true
80 end
webauthn_setup_view()
[show source]
   # File lib/rodauth/features/internal_request.rb
92 def webauthn_setup_view
93   cred = new_webauthn_credential
94   _return_from_internal_request({
95     webauthn_setup: cred.as_json,
96     webauthn_setup_challenge: cred.challenge,
97     webauthn_setup_challenge_hmac: webauthn_credential_challenge_hmac(cred.challenge)
98   })
99 end