Package edu.uiuc.ncsa.oa2.servlet
Class RFC8628Servlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- edu.uiuc.ncsa.security.servlet.AbstractServlet
-
- All Implemented Interfaces:
RFC8628Constants2
,TransactionFilter
,RFC8628Constants
,edu.uiuc.ncsa.security.core.Logable
,Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class RFC8628Servlet extends MultiAuthServlet implements RFC8628Constants2
Servlet that starts RFC 8628 a.a device flow .This issues a user code that the user must present to an authorization endpoint.Created by Jeff Gaynor
on 2/9/21 at 11:21 AM- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static SecureRandom
secureRandom
-
Fields inherited from class edu.uiuc.ncsa.myproxy.oa4mp.server.servlet.MyProxyDelegationServlet
caThread, kpt, lastAccessedThread, myproxyConnectionCache, myproxyConnectionCleanup, transactionCleanup
-
Fields inherited from class edu.uiuc.ncsa.myproxy.oa4mp.server.servlet.EnvServlet
ERROR_NOTIFICATION_BODY_KEY, ERROR_NOTIFICATION_SUBJECT_KEY, notificationListeners, storeUpdatesDone
-
Fields inherited from class edu.uiuc.ncsa.security.servlet.AbstractServlet
environment, initialization, PING_PARAMETER
-
Fields inherited from interface edu.uiuc.ncsa.oa4mp.delegation.oa2.server.RFC8628Constants
CODE_CHARS, DEFAULT_WAIT, DEVICE_AUTHORIZATION_ENDPOINT, DEVICE_CODE, EXPIRES_IN, GRANT_TYPE_DEVICE_CODE, INTERVAL, USER_CODE, USER_CODE_DEFAULT_LENGTH, USER_CODE_PERIOD_LENGTH, USER_CODE_SEPERATOR_CHAR, VERIFICATION_URI, VERIFICATION_URI_COMPLETE, VERIFICATION_URI_ENDPOINT
-
-
Constructor Summary
Constructors Constructor Description RFC8628Servlet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkParameters(OA2ServiceTransaction t, OA2Client client, AGResponse agResponse, javax.servlet.http.HttpServletRequest req)
static String
convertToCanonicalForm(String x, RFC8628ServletConfig rfc8628ServletConfig)
Used in the DB servlet mostly to take whatever the user types in (may or may not include the user code seperator), be in mixed case.protected void
doIt(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
protected String
getClientSecret(javax.servlet.http.HttpServletRequest request)
protected static String
getUserCode(RFC8628ServletConfig rfc8628ServletConfig)
static void
main(String[] args)
ServiceTransaction
verifyAndGet(IssuerResponse iResponse)
This is called after the response is received so that the system can get the approproate transaction.-
Methods inherited from class edu.uiuc.ncsa.myproxy.oa4mp.oauth2.servlet.MultiAuthServlet
getAdminClient, getAdminClient, getClient, verifyClientSecret
-
Methods inherited from class edu.uiuc.ncsa.myproxy.oa4mp.server.servlet.MyProxyDelegationServlet
checkClientApproval, createDebugger, destroy, getAGI, getATI, getClient, getClient, getFirstParameters, getGrantIDFromRequest, getMPConnection, getMPConnection, getMyproxyConnectionCache, getMyproxyServices, getServiceEnvironment, getTransaction, getTransactionByGrantID, getTransactionStore, hasMPConnection, hasMPConnection, isEmpty, loadProperties2, newTransaction, postprocess, preprocess, realStoreUpdates, say, shutdownCleanup, storeUpdates
-
Methods inherited from class edu.uiuc.ncsa.myproxy.oa4mp.server.servlet.EnvServlet
addNotificationListener, loadEnvironment, processStoreCheck, removeNotificationListener
-
Methods inherited from class edu.uiuc.ncsa.security.servlet.AbstractServlet
checkContentType, CONST, debug, doGet, doPing, doPost, error, error, getConfigurationLoader, getEnvironment, getExceptionHandler, getFirstParameterValue, getInitialization, getMyLogger, handleException, info, init, isDebugOn, printAllParameters, printAllParameters, resetState, setConfigurationLoader, setDebugOn, setEnvironment, setExceptionHandler, setInitialization, warn
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
-
-
-
Field Detail
-
secureRandom
protected static SecureRandom secureRandom
-
-
Method Detail
-
verifyAndGet
public ServiceTransaction verifyAndGet(IssuerResponse iResponse) throws IOException
Description copied from class:MyProxyDelegationServlet
This is called after the response is received so that the system can get the approproate transaction. Checks for the validity of the transaction should be done here too.- Specified by:
verifyAndGet
in classMyProxyDelegationServlet
- Returns:
- Throws:
IOException
-
doIt
protected void doIt(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws Throwable
- Specified by:
doIt
in classedu.uiuc.ncsa.security.servlet.AbstractServlet
- Throws:
Throwable
-
getClientSecret
protected String getClientSecret(javax.servlet.http.HttpServletRequest request)
- Overrides:
getClientSecret
in classMultiAuthServlet
-
checkParameters
protected void checkParameters(OA2ServiceTransaction t, OA2Client client, AGResponse agResponse, javax.servlet.http.HttpServletRequest req) throws Throwable
- Throws:
Throwable
-
getUserCode
protected static String getUserCode(RFC8628ServletConfig rfc8628ServletConfig)
-
convertToCanonicalForm
public static String convertToCanonicalForm(String x, RFC8628ServletConfig rfc8628ServletConfig)
Used in the DB servlet mostly to take whatever the user types in (may or may not include the user code seperator), be in mixed case.- Parameters:
x
-- Returns:
-
main
public static void main(String[] args)
-
-