From f15ca67765fe3d9e129398d4ee3daa27cedfe00d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 7 Nov 2013 16:24:58 +0100 Subject: Token based authentication implemented. We use the session id cookie in the SRP process, and then reset the cookie store (forgetting about that cookie) and store the authentication token in a static variable inside LeapSRPSession. --- src/se/leap/bitmaskclient/LeapSRPSession.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/se/leap/bitmaskclient/LeapSRPSession.java') diff --git a/src/se/leap/bitmaskclient/LeapSRPSession.java b/src/se/leap/bitmaskclient/LeapSRPSession.java index 14a8bff2..0849f777 100644 --- a/src/se/leap/bitmaskclient/LeapSRPSession.java +++ b/src/se/leap/bitmaskclient/LeapSRPSession.java @@ -35,9 +35,12 @@ import org.jboss.security.srp.SRPParameters; */ public class LeapSRPSession { + private static String token = ""; + final public static String SALT = "salt"; final public static String M1 = "M1"; final public static String M2 = "M2"; + final public static String TOKEN = "token"; private SRPParameters params; private String username; @@ -312,6 +315,14 @@ public class LeapSRPSession { boolean valid = Arrays.equals(M2, myM2); return valid; } + + protected static void setToken(String token) { + LeapSRPSession.token = token; + } + + protected static String getToken() { + return token; + } /** * @return a new SHA-256 digest. -- cgit v1.2.3