OneTimeAuthenticationToken

public class OneTimeAuthenticationToken extends SelfValidatingAuthenticationToken

Fields

DEFAULT_MAX_REPLAYS

public static final long DEFAULT_MAX_REPLAYS

DEFAULT_REPLAYS_TIMEOUT_MS

public static final int DEFAULT_REPLAYS_TIMEOUT_MS

DEFAULT_TIMEOUT_MS

public static final int DEFAULT_TIMEOUT_MS

LOGGER

public static final Logger LOGGER

REALM_NAME

public static final String REALM_NAME

purposes

static Map<String, Config> purposes

Constructors

OneTimeAuthenticationToken

public OneTimeAuthenticationToken(Principal principal, long date, long timeout, String salt, String checksum, String[] permissions, String[] roles, long maxReplays, long replaysTimeout)

OneTimeAuthenticationToken

public OneTimeAuthenticationToken(Principal principal, long timeout, String[] permissions, String[] roles, Long maxReplays, Long replaysTimeout)

Methods

calcChecksum

public String calcChecksum(String pepper)

consume

public void consume()

generate

public static OneTimeAuthenticationToken generate(Config c)

generate

public static OneTimeAuthenticationToken generate(Config c, Principal principal)

generateForPurpose

public static OneTimeAuthenticationToken generateForPurpose(String purpose, Subject user)

getMaxReplays

public long getMaxReplays()

getPurposeMap

public static Map<String, Config> getPurposeMap(List<Config> configs)

getPurposeMap

public static Map<String, Config> getPurposeMap()

getReplaysTimeout

public long getReplaysTimeout()

initConfig

public static void initConfig(InputStream yamlConfig)

initConfig

public static void initConfig()

loadConfig

public static List<Config> loadConfig(InputStream input)

parse

public static OneTimeAuthenticationToken parse(Object[] array)

Return consumed.

Parameters:
  • array

  • curry

resetConfig

public static void resetConfig()

setFields

protected void setFields(Object[] fields)

toString

public String toString()