44class DeviseController
55 protected
66
7+ # Gets the actual resource stored in the instance variable
78 sig { returns ( T . untyped ) }
89 def resource ; end
910
1011 # Proxy to devise map name
11- sig { returns ( String ) }
12+ sig { returns ( Symbol ) }
1213 def resource_name ; end
1314
14- sig { returns ( String ) }
15+ sig { returns ( Symbol ) }
1516 def scope_name ; end
1617
1718 # Proxy to devise map class
@@ -26,18 +27,43 @@ class DeviseController
2627 sig { returns ( T . untyped ) }
2728 def devise_mapping ; end
2829
30+ # Returns real navigational formats which are supported by Rails
2931 sig { returns ( T . untyped ) }
3032 def navigational_formats ; end
3133
32- sig { returns ( ActionController ::Parameters ) }
33- def resource_params ; end
34-
34+ sig { params ( msg : String ) . returns ( T . noreturn ) }
35+ def unknown_action! ( msg ) ; end
36+
37+ # Sets the resource creating an instance variable
38+ sig { params ( new_resource : T . untyped ) . void }
39+ def resource = ( new_resource ) ; end
40+
41+ # Helper for use in before_actions where no authentication is required.
42+ #
43+ # Example:
44+ # before_action :require_no_authentication, only: :new
45+ sig { void }
46+ def require_no_authentication ; end
47+
48+ # Helper for use after calling send_*_instructions methods on a resource.
49+ # If we are in paranoid mode, we always act as if the resource was valid
50+ # and instructions were sent.
51+ sig { params ( resource : T . untyped ) . returns ( T . nilable ( T ::Boolean ) ) }
52+ def successfully_sent? ( resource ) ; end
53+
54+ # Controllers inheriting DeviseController are advised to override this
55+ # method so that other controllers inheriting from them would use
56+ # existing translations.
3557 sig { returns ( String ) }
3658 def translation_scope ; end
59+
60+ sig { returns ( ActionController ::Parameters ) }
61+ def resource_params ; end
3762end
3863
3964# @shim: Devise controllers are loaded by rails
4065class Devise ::ConfirmationsController < DeviseController
66+ # GET /resource/confirmation/new
4167 sig { returns ( T . untyped ) }
4268 def new ; end
4369
@@ -48,6 +74,36 @@ class Devise::ConfirmationsController < DeviseController
4874 # GET /resource/confirmation?confirmation_token=abcdef
4975 sig { returns ( T . untyped ) }
5076 def show ; end
77+
78+ protected
79+
80+ # The path used after resending confirmation instructions.
81+ sig { params ( resource_name : Symbol ) . returns ( String ) }
82+ def after_resending_confirmation_instructions_path_for ( resource_name ) ; end
83+
84+ # The path used after confirmation.
85+ sig { params ( resource_name : Symbol , resource : T . untyped ) . returns ( String ) }
86+ def after_confirmation_path_for ( resource_name , resource ) ; end
87+ end
88+
89+ # @shim: Devise controllers are loaded by rails
90+ class Devise ::OmniauthCallbacksController < DeviseController
91+ sig { returns ( T . untyped ) }
92+ def passthru ; end
93+
94+ sig { returns ( T . untyped ) }
95+ def failure ; end
96+
97+ protected
98+
99+ sig { returns ( String ) }
100+ def failed_strategy ; end
101+
102+ sig { returns ( String ) }
103+ def failure_message ; end
104+
105+ sig { params ( scope : String ) . returns ( String ) }
106+ def after_omniauth_failure_path_for ( scope ) ; end
51107end
52108
53109# @shim: Devise controllers are loaded by rails
@@ -67,10 +123,29 @@ class Devise::PasswordsController < DeviseController
67123 # PUT /resource/password
68124 sig { returns ( T . untyped ) }
69125 def update ; end
126+
127+ protected
128+
129+ sig { params ( resource : T . untyped ) . returns ( String ) }
130+ def after_resetting_password_path_for ( resource ) ; end
131+
132+ # The path used after sending reset password instructions
133+ sig { params ( resource_name : Symbol ) . returns ( T . nilable ( String ) ) }
134+ def after_sending_reset_password_instructions_path_for ( resource_name ) ; end
135+
136+ # Check if a reset_password_token is provided in the request
137+ sig { void }
138+ def assert_reset_token_passed ; end
139+
140+ # Check if proper Lockable module methods are present & unlock strategy
141+ # allows to unlock resource on password reset
142+ sig { params ( resource : T . untyped ) . returns ( T ::Boolean ) }
143+ def unlockable? ( resource ) ; end
70144end
71145
72146# @shim: Devise controllers are loaded by rails
73147class Devise ::RegistrationsController < DeviseController
148+ # GET /resource/sign_up
74149 sig { returns ( T . untyped ) }
75150 def new ; end
76151
@@ -99,6 +174,51 @@ class Devise::RegistrationsController < DeviseController
99174 # removing all OAuth session data.
100175 sig { returns ( T . untyped ) }
101176 def cancel ; end
177+
178+ protected
179+
180+ sig { params ( resource : T . untyped , previous : T . untyped ) . returns ( T ::Boolean ) }
181+ def update_needs_confirmation? ( resource , previous ) ; end
182+
183+ # By default we want to require a password checks on update.
184+ # You can overwrite this method in your own RegistrationsController.
185+ sig { params ( resource : T . untyped , params : ActionController ::Parameters ) . void }
186+ def update_resource ( resource , params ) ; end
187+
188+ # Build a devise resource passing in the session. Useful to move
189+ # temporary session data to the newly created user.
190+ sig { params ( hash : T . untyped ) . returns ( T . untyped ) }
191+ def build_resource ( hash = { } ) ; end
192+
193+ # Signs in a user on sign up. You can overwrite this method in your own
194+ # RegistrationsController.
195+ sig { params ( resource_name : Symbol , resource : T . untyped ) . void }
196+ def sign_up ( resource_name , resource ) ; end
197+
198+ # The path used after sign up. You need to overwrite this method
199+ # in your own RegistrationsController.
200+ sig { params ( resource : T . untyped ) . returns ( T . nilable ( String ) ) }
201+ def after_sign_up_path_for ( resource ) ; end
202+
203+ # The path used after sign up for inactive accounts. You need to overwrite
204+ # this method in your own RegistrationsController.
205+ sig { params ( resource : T . untyped ) . returns ( String ) }
206+ def after_inactive_sign_up_path_for ( resource ) ; end
207+
208+ # The default url to be used after updating a resource. You need to overwrite
209+ # this method in your own RegistrationsController.
210+ sig { params ( resource : T . untyped ) . returns ( String ) }
211+ def after_update_path_for ( resource ) ; end
212+
213+ # Authenticates the current scope and gets the current resource from the session.
214+ sig { void }
215+ def authenticate_scope! ; end
216+
217+ sig { returns ( ActionController ::Parameters ) }
218+ def sign_up_params ; end
219+
220+ sig { returns ( ActionController ::Parameters ) }
221+ def account_update_params ; end
102222end
103223
104224# @shim: Devise controllers are loaded by rails
@@ -119,6 +239,12 @@ class Devise::SessionsController < DeviseController
119239
120240 sig { returns ( ActionController ::Parameters ) }
121241 def sign_in_params ; end
242+
243+ sig { params ( resource : T . untyped ) . returns ( T ::Hash [ Symbol , T . untyped ] ) }
244+ def serialize_options ( resource ) ; end
245+
246+ sig { returns ( T ::Hash [ Symbol , T . untyped ] ) }
247+ def auth_options ; end
122248end
123249
124250# @shim: Devise controllers are loaded by rails
@@ -138,35 +264,115 @@ class Devise::UnlocksController < DeviseController
138264 protected
139265
140266 # The path used after sending unlock password instructions
141- sig { params ( resource : T . untyped ) . returns ( String ) }
267+ sig { params ( resource : T . untyped ) . returns ( T . nilable ( String ) ) }
142268 def after_sending_unlock_instructions_path_for ( resource ) ; end
143269
144270 # The path used after unlocking the resource
145- sig { params ( resource : T . untyped ) . returns ( String ) }
271+ sig { params ( resource : T . untyped ) . returns ( T . nilable ( String ) ) }
146272 def after_unlock_path_for ( resource ) ; end
147273end
148274
149- # @shim: Devise controllers are loaded by rails
150- class Devise ::OmniauthCallbacksController < DeviseController
151- # GET|POST /resource/auth/provider
152- sig { returns ( T . untyped ) }
153- def passthru ; end
275+ module Devise
276+ sig { params ( block : T . proc . params ( config : T . class_of ( ::Devise ) ) . void ) . void }
277+ def self . setup ( &block ) ; end
154278
155- # GET|POST /resource/auth/provider/callback
156- sig { returns ( T . untyped ) }
157- def failure ; end
279+ module Models
280+ module Authenticatable
281+ sig { returns ( T ::Boolean ) }
282+ def active_for_authentication? ; end
283+ end
158284
159- protected
285+ module Confirmable
286+ sig { returns ( T ::Boolean ) }
287+ def confirmed? ; end
160288
161- sig { returns ( String ) }
162- def failed_strategy ; end
289+ sig { returns ( T :: Boolean ) }
290+ def pending_reconfirmation? ; end
163291
164- sig { returns ( String ) }
165- def failure_message ; end
292+ sig { void }
293+ def send_confirmation_instructions ; end
166294
167- sig { params ( scope : String ) . returns ( String ) }
168- def after_omniauth_failure_path_for ( scope ) ; end
295+ sig { void }
296+ def resend_confirmation_instructions ; end
169297
170- sig { returns ( String ) }
171- def translation_scope ; end
298+ sig { returns ( T ::Boolean ) }
299+ def active_for_authentication? ; end
300+
301+ sig { void }
302+ def skip_confirmation! ; end
303+
304+ sig { void }
305+ def skip_confirmation_notification! ; end
306+
307+ sig { void }
308+ def skip_reconfirmation! ; end
309+ end
310+
311+ module DatabaseAuthenticatable
312+ sig { void }
313+ def skip_email_changed_notification! ; end
314+
315+ sig { void }
316+ def skip_password_change_notification! ; end
317+
318+ sig { void }
319+ def after_database_authentication ; end
320+
321+ sig { void }
322+ def send_email_changed_notification ; end
323+
324+ sig { void }
325+ def send_password_change_notification ; end
326+ end
327+
328+ module Lockable
329+ sig { params ( opts : T ::Hash [ Symbol , T . untyped ] ) . void }
330+ def lock_access! ( opts = { } ) ; end
331+
332+ sig { void }
333+ def unlock_access! ; end
334+
335+ sig { void }
336+ def reset_failed_attempts! ; end
337+
338+ sig { returns ( T ::Boolean ) }
339+ def access_locked? ; end
340+
341+ sig { void }
342+ def send_unlock_instructions ; end
343+
344+ sig { void }
345+ def resend_unlock_instructions ; end
346+
347+ sig { returns ( T ::Boolean ) }
348+ def active_for_authentication? ; end
349+
350+ sig { returns ( T ::Boolean ) }
351+ def valid_for_authentication? ; end
352+ end
353+
354+ module Recoverable
355+ sig { void }
356+ def send_reset_password_instructions ; end
357+
358+ sig { returns ( T ::Boolean ) }
359+ def reset_password_period_valid? ; end
360+ end
361+
362+ module Rememberable
363+ sig { void }
364+ def remember_me! ; end
365+
366+ sig { void }
367+ def forget_me! ; end
368+
369+ sig { void }
370+ def after_remembered ; end
371+ end
372+
373+ module Timeoutable
374+ sig { params ( last_access : T . untyped ) . returns ( T ::Boolean ) }
375+ def timedout? ( last_access ) ; end
376+ end
377+ end
172378end
0 commit comments