Class TokenInfoRecordMap
- java.lang.Object
-
- org.oa4mp.server.loader.oauth2.storage.TokenInfoRecordMap
-
public class TokenInfoRecordMap extends Object
This tracksTokenInfoRecord
by their client and transaction id, since we need to manage them both ways. This is intended to be used by the token info endpoint to accumulateCreated by Jeff Gaynor
on 3/21/22 at 8:28 AM
-
-
Constructor Summary
Constructors Constructor Description TokenInfoRecordMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(TokenInfoRecord tir)
boolean
containsClient(edu.uiuc.ncsa.security.core.Identifier clientID)
Returnstrue
if this client has aTokenInfoRecord
.List<TokenInfoRecord>
getByClientID(edu.uiuc.ncsa.security.core.Identifier clientID)
Get all of the token records associated with this client id.List<TokenInfoRecord>
getByTID(edu.uiuc.ncsa.security.core.Identifier transactionID)
For a given transaction id, get all of the token records.edu.uiuc.ncsa.security.core.Identifier
getClientID(edu.uiuc.ncsa.security.core.Identifier tID)
Given the transaction id, find the corresponding token id.Set<edu.uiuc.ncsa.security.core.Identifier>
getClientIDs()
get the set of all client idsSet<edu.uiuc.ncsa.security.core.Identifier>
getTransactionIDs()
Gets the set of all transaction ids.void
put(TokenInfoRecord tir)
protected void
put(Map<edu.uiuc.ncsa.security.core.Identifier,List<TokenInfoRecord>> map, TokenInfoRecord tir, edu.uiuc.ncsa.security.core.Identifier identifier)
void
reduceTo(Set<edu.uiuc.ncsa.security.core.Identifier> clientIDs)
Remove all identifiers except the ones in the listvoid
remove(edu.uiuc.ncsa.security.core.Identifier clientID)
removes all the token info records associated with this client.Map<edu.uiuc.ncsa.security.core.Identifier,List<TokenInfoRecord>>
sortByClientID(edu.uiuc.ncsa.security.core.Identifier clientID)
returns a map of all tokens associated with the transaction id.
-
-
-
Method Detail
-
put
public void put(TokenInfoRecord tir)
-
put
protected void put(Map<edu.uiuc.ncsa.security.core.Identifier,List<TokenInfoRecord>> map, TokenInfoRecord tir, edu.uiuc.ncsa.security.core.Identifier identifier)
-
getByTID
public List<TokenInfoRecord> getByTID(edu.uiuc.ncsa.security.core.Identifier transactionID)
For a given transaction id, get all of the token records.- Parameters:
transactionID
-- Returns:
-
getByClientID
public List<TokenInfoRecord> getByClientID(edu.uiuc.ncsa.security.core.Identifier clientID)
Get all of the token records associated with this client id. You must separate them out by transaction id.- Parameters:
clientID
-- Returns:
-
contains
public boolean contains(TokenInfoRecord tir)
-
containsClient
public boolean containsClient(edu.uiuc.ncsa.security.core.Identifier clientID)
Returnstrue
if this client has aTokenInfoRecord
.- Parameters:
clientID
-- Returns:
-
getClientIDs
public Set<edu.uiuc.ncsa.security.core.Identifier> getClientIDs()
get the set of all client ids- Returns:
-
getTransactionIDs
public Set<edu.uiuc.ncsa.security.core.Identifier> getTransactionIDs()
Gets the set of all transaction ids.- Returns:
-
getClientID
public edu.uiuc.ncsa.security.core.Identifier getClientID(edu.uiuc.ncsa.security.core.Identifier tID)
Given the transaction id, find the corresponding token id.- Parameters:
tID
-- Returns:
-
remove
public void remove(edu.uiuc.ncsa.security.core.Identifier clientID)
removes all the token info records associated with this client.- Parameters:
clientID
-
-
reduceTo
public void reduceTo(Set<edu.uiuc.ncsa.security.core.Identifier> clientIDs)
Remove all identifiers except the ones in the list- Parameters:
clientIDs
-
-
sortByClientID
public Map<edu.uiuc.ncsa.security.core.Identifier,List<TokenInfoRecord>> sortByClientID(edu.uiuc.ncsa.security.core.Identifier clientID)
returns a map of all tokens associated with the transaction id. The key is the transaction ID.- Parameters:
clientID
-- Returns:
-
-