![JAR search and dependency download from the Maven repository](/logo.png)
io.femo.http.handlers.auth.SimpleNonceManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http-jdk7 Show documentation
Show all versions of http-jdk7 Show documentation
An easy to use HTTP API, that supports synchronous and asynchronous execution of HTTP request.
On android only asynchronous driver is supported.
This library has been backported to jdk 7 to retain compatibility with android!
The newest version!
package io.femo.http.handlers.auth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.UUID;
/**
* Created by felix on 6/13/16.
*/
public class SimpleNonceManager implements NonceManager {
private static final Logger LOGGER = LoggerFactory.getLogger("HTTP");
public SimpleNonceManager () {
LOGGER.warn("You are using an unsafe basic implementation of NonceManager. Please use a database backed one in production environments for security reasons.");
}
@Override
public String generateNew() {
return UUID.randomUUID().toString();
}
@Override
public String getOpaque(String nonce) {
return UUID.randomUUID().toString();
}
@Override
public boolean verifyAndUpdate(String nonce, String nc) {
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy