Method: J1WardenOmniAuth.on_callback

Defined in:
lib/j1_app/j1_auth_manager/warden_omniauth.rb

.on_callback(&blk) ⇒ Object

Setup a callback to transform the user from the OmniAuth user hash to what warden to store as the user object

Examples:

J1WardenOmniAuth.on_callback do |omni_user|
  User.find_or_create_by_uid(omni_user['uid'])
end


42
43
44
45
# File 'lib/j1_app/j1_auth_manager/warden_omniauth.rb', line 42

def self.on_callback(&blk)
  @on_callback = blk if blk
  @on_callback || DEFAULT_CALLBACK
end