Package org.oa4mp.server.proxy
Class RFC8628Servlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- edu.uiuc.ncsa.security.servlet.AbstractServlet
-
- org.oa4mp.server.api.storage.servlet.EnvServlet
-
- org.oa4mp.server.api.storage.servlet.OA4MPServlet
-
- org.oa4mp.server.loader.oauth2.servlet.MultiAuthServlet
-
- org.oa4mp.server.proxy.RFC8628Servlet
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Logable,Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig,TransactionFilter,RFC8628Constants,RFC8628Constants2
public class RFC8628Servlet extends MultiAuthServlet implements RFC8628Constants2
Servlet that starts the RFC 8628 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 SecureRandomsecureRandom-
Fields inherited from class org.oa4mp.server.loader.oauth2.servlet.MultiAuthServlet
upkeepThreadList
-
Fields inherited from class org.oa4mp.server.api.storage.servlet.OA4MPServlet
caThread, kpt, lastAccessedThread, transactionCleanup
-
Fields inherited from class org.oa4mp.server.api.storage.servlet.EnvServlet
ERROR_NOTIFICATION_BODY_KEY, ERROR_NOTIFICATION_SUBJECT_KEY, notificationListeners, storeUpdatesDone
-
Fields inherited from class edu.uiuc.ncsa.security.servlet.AbstractServlet
environment, initialization, IP_HEADERS, PING_PARAMETER
-
Fields inherited from interface org.oa4mp.delegation.server.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 voidcheckParameters(OA2ServiceTransaction t, OA2Client client, AGResponse agResponse, javax.servlet.http.HttpServletRequest req)static StringconvertToCanonicalForm(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 voiddoIt(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)protected StringgetClientSecret(javax.servlet.http.HttpServletRequest request)protected static StringgetUserCode(RFC8628ServletConfig rfc8628ServletConfig)static voidmain(String[] args)ServiceTransactionverifyAndGet(IssuerResponse iResponse)This is called after the response is received so that the system can get the approproate transaction.-
Methods inherited from class org.oa4mp.server.loader.oauth2.servlet.MultiAuthServlet
getAdminClient, getAdminClient, getClient, verifyClient, verifyClient, verifyClientSecret
-
Methods inherited from class org.oa4mp.server.api.storage.servlet.OA4MPServlet
checkAdminClientStatus, checkClientApproval, createDebugger, destroy, findSigningKey, getAGI, getATI, getClient, getClient, getFirstParameters, getFirstParameterValue, getGrantIDFromRequest, getServiceEnvironment, getTransaction, getTransactionByGrantID, getTransactionStore, isEmpty, loadProperties2, newTransaction, postprocess, preprocess, realStoreUpdates, say, shutdownCleanup, storeUpdates
-
Methods inherited from class org.oa4mp.server.api.storage.servlet.EnvServlet
addNotificationListener, checkCancel, checkCancel, isCancelled, loadEnvironment, processStoreCheck, removeNotificationListener
-
Methods inherited from class edu.uiuc.ncsa.security.servlet.AbstractServlet
checkContentType, CONST, debug, doGet, doPing, doPost, error, error, getConfigurationLoader, getEnvironment, getExceptionHandler, getInitialization, getMyLogger, getRequestIPAddress, handleException, info, init, isDebugOn, logOK, logOK, 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:OA4MPServletThis 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:
verifyAndGetin classOA4MPServlet- Returns:
- Throws:
IOException
-
doIt
protected void doIt(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws Throwable- Specified by:
doItin classedu.uiuc.ncsa.security.servlet.AbstractServlet- Throws:
Throwable
-
getClientSecret
protected String getClientSecret(javax.servlet.http.HttpServletRequest request)
- Overrides:
getClientSecretin 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)
-
-