Skip to content

Instantly share code, notes, and snippets.

@bttmly
Created March 4, 2014 19:36
Show Gist options
  • Save bttmly/9353943 to your computer and use it in GitHub Desktop.
Save bttmly/9353943 to your computer and use it in GitHub Desktop.
<%@ page import="net.tok3n.Tok3nImpl" %>
<%@ page import="net.tok3n.Tok3nResponse" %>
<%
tok3n.setPrivateKey("your_private_key");
Tok3nImpl tok3n = new Tok3nImpl();
String otp = request.getParameter("tok3n_otp_field");
Tok3nResponse tok3nResponse = tok3n.verify(user_key, otp);
if (tok3nResponse.isValid()) {
// Successful verification
} else {
// Failed verification
}
%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment