
com.daedafusion.security.authentication.impl.ContextToken Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of security-framework Show documentation
Show all versions of security-framework Show documentation
A pluggable security framework "inspired" by the OWASP ESAPI framework
The newest version!
package com.daedafusion.security.authentication.impl;
import com.daedafusion.security.authentication.Token;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/**
* Created by mphilpot on 2/7/17.
*/
public class ContextToken implements Token
{
private final String token;
private final Map context;
public ContextToken(String token)
{
this.token = token;
context = new HashMap<>();
}
public ContextToken addContext(String key, String value)
{
context.put(key, value);
return this;
}
@Override
public String getTokenString()
{
return token;
}
@Override
public Map getContext()
{
return Collections.unmodifiableMap(context);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy