public class NonceUtils extends Object
We assign on login, and remove on successful callback completion callback request is checked for validity by correctly matching state in http request with state held in storage (library uses http session)
By using a nonce attribute in the state request param, we can also add additional attributes as needed such as externalRedirectURL for SSO scenarios etc
| Constructor and Description |
|---|
NonceUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addNonceToStorage(javax.servlet.http.HttpServletRequest req) |
static boolean |
matchesNonceInStorage(javax.servlet.http.HttpServletRequest req,
String stateFromRequest) |
static void |
removeNonceFromStorage(javax.servlet.http.HttpServletRequest req) |
public static final String NONCE_KEY
public static void addNonceToStorage(javax.servlet.http.HttpServletRequest req)
public static void removeNonceFromStorage(javax.servlet.http.HttpServletRequest req)
public static boolean matchesNonceInStorage(javax.servlet.http.HttpServletRequest req,
String stateFromRequest)
Copyright © 2016. All Rights Reserved.