context.setUnAttachedSecurityTokenReference(unattachedRef);
context.setProofKey(secret);
context.setCreationTime(new Date(currentTime));
context.setExpirationTime(new Date(currentTime + this.getSCTokenTimeout()));
final SecurityContextTokenInfo sctinfo = new SecurityContextTokenInfoImpl();
sctinfo.setIdentifier(token.getIdentifier().toString());
sctinfo.setExternalId(token.getWsuId());
sctinfo.addInstance(null, secret);
sctinfo.setCreationTime(new Date(currentTime));
sctinfo.setExpirationTime(new Date(currentTime + this.getSCTokenTimeout()));
final SessionManager sm = (SessionManager)context.getOtherProperties().get("SessionManager");
sm.createSession(token.getIdentifier().toString(), sctinfo);
context.setSecurityContextTokenInfo(sctinfo);
sm.addSecurityContext(token.getIdentifier().toString(), context);