add jwt authentication on graphql controller
This commit is contained in:
14
app/services/auth/authenticate.rb
Normal file
14
app/services/auth/authenticate.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
# frozen_string_literal: true
|
||||
module Auth
|
||||
class Authenticate
|
||||
attr_reader :jwt_token
|
||||
|
||||
def initialize(jwt_token)
|
||||
@jwt_token = jwt_token
|
||||
end
|
||||
|
||||
def profile
|
||||
Auth0Client.find_profile(jwt_token)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user