Module: JwtApiAuth::Helpers

Defined in:
lib/jwt_api_auth/helpers.rb

Instance Method Summary collapse

Instance Method Details

#refresh_token_enabled?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/jwt_api_auth/helpers.rb', line 21

def refresh_token_enabled?
  JwtApiAuth.refresh_token_model.present?
end

#refresh_token_model_classObject



17
18
19
# File 'lib/jwt_api_auth/helpers.rb', line 17

def refresh_token_model_class
  refresh_token_model_name.classify.constantize
end

#refresh_token_model_nameObject



13
14
15
# File 'lib/jwt_api_auth/helpers.rb', line 13

def refresh_token_model_name
  JwtApiAuth.refresh_token_model.to_s
end

#resource_classObject



9
10
11
# File 'lib/jwt_api_auth/helpers.rb', line 9

def resource_class
  resource_name.classify.constantize
end

#resource_nameObject



5
6
7
# File 'lib/jwt_api_auth/helpers.rb', line 5

def resource_name
  JwtApiAuth.model.to_s
end