Skip to content
Snippets Groups Projects
Commit f62f37cc authored by Bruno Nocera Zanette's avatar Bruno Nocera Zanette
Browse files

Add Dspace_Service method

parent d77c96ad
No related branches found
No related tags found
No related merge requests found
......@@ -2,4 +2,20 @@ class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
def dspace_service
@dspace_service ||= DspaceService.new(
DspaceService.create_dspace_client(
'https://portalmecdev.c3sl.ufpr.br:8443/rest',
get_remote_authenticable_token
)
)
end
private
def get_remote_authenticable_token
session[:dspace_auth_token] || nil
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment