public class JPABasedTokenRegistry extends AbstractJPARegistry implements SecurityTokenRegistry
SecurityTokenRegistry
implementation that uses JPA to store tokens. By default, the JPA configuration has
the
name
picketlink-sts
but a different configuration name can be specified through the constructor that takes a
String
as a parameter.
SecurityToken}
logger
Constructor and Description |
---|
JPABasedTokenRegistry() |
JPABasedTokenRegistry(String configuration) |
Modifier and Type | Method and Description |
---|---|
void |
addToken(String id,
Object token)
Add a token to the registry with the given id
|
Object |
getToken(String id)
Given the id, return a token
|
void |
removeToken(String id)
Remove a token given the ID
|
getEntityManagerFactory
public JPABasedTokenRegistry()
public JPABasedTokenRegistry(String configuration)
public void addToken(String id, Object token) throws IOException
SecurityTokenRegistry
addToken
in interface SecurityTokenRegistry
IOException
public void removeToken(String id) throws IOException
SecurityTokenRegistry
removeToken
in interface SecurityTokenRegistry
IOException
public Object getToken(String id)
SecurityTokenRegistry
getToken
in interface SecurityTokenRegistry
Copyright © 2016 JBoss by Red Hat. All rights reserved.