Package org.mycore.orcid.oauth
Class MCROAuthServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.mycore.frontend.servlets.MCRServlet
org.mycore.orcid.oauth.MCROAuthServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet
,jakarta.servlet.ServletConfig
,Serializable
Implements ORCID OAuth2 authorization.
User should invoke MCROAuthServlet without any parameters.
The servlet will redirect the user to orcid.org authorization.
The user will login at orcid.org and accept or deny this application as trusted party
for the activity scopes defined in MCR.ORCID.OAuth.Scopes.
orcid.org then redirects the user's browser to this servlet again.
If the scopes were accepted by user, the response contains a code parameter.
This code is exchanged for an access token and stored in the user's attributes here.
See https://members.orcid.org/api/oauth/3legged-oauth
- Author:
- Frank Lützenkirchen
- See Also:
-
Field Summary
Fields inherited from class org.mycore.frontend.servlets.MCRServlet
ATTR_MYCORE_SESSION, CURRENT_THREAD_NAME_KEY, INITIAL_SERVLET_NAME_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doGetPost
(MCRServletJob job) This method should be overwritten by other servlets.Methods inherited from class org.mycore.frontend.servlets.MCRServlet
allowCrossDomainRequests, buildRedirectURL, cleanupMCRSession, doGet, doGet, doPost, doPost, getErrorI18N, getLastModified, getLayoutService, getProperty, getReferer, getServletBaseURL, getSession, handleException, init, initializeMCRSession, render, reportException, think, toReferrer, toReferrer
Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, service, service
Methods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
MCROAuthServlet
public MCROAuthServlet()
-
-
Method Details
-
doGetPost
Description copied from class:MCRServlet
This method should be overwritten by other servlets. As a default response we indicate the HTTP 1.1 status code 501 (Not Implemented).- Overrides:
doGetPost
in classMCRServlet
- Throws:
Exception
-