Module: UserHelper
- Defined in:
- lib/user_helper.rb
Instance Method Summary collapse
Instance Method Details
#authenticate_user? ⇒ Boolean
7 8 9 10 11 12 13 |
# File 'lib/user_helper.rb', line 7 def authenticate_user? if is_jwt_valid_token? return true else render json: {"error" => "User Authentication Failed", :status => 401}, :status => 401 and return end end |
#current_ms_user ⇒ Object
3 4 5 |
# File 'lib/user_helper.rb', line 3 def current_ms_user @_current_ms_user ||= OpenStruct.new(@decoded_token) if is_jwt_valid_token? end |