Skip to main content

HS.HC.Util.InfoCache

class HS.HC.Util.InfoCache

This class provides methods for maintaining cached application run-time data in a protected database.

Method Inventory

Methods

final classmethod CacheTokenInfo(pCacheId As %String, pTokenString As %String, pTokenJWT As %DynamicObject = "") as %Status
@API
Cache simple information about an OAuth token.
@Input pCacheId (required) Identifier formulated and managed by the caller. Must be unique across all running processes.
@Input pTokenString (required) Bearer token string.
@Input pTokenJWT (optional) JWT object for the token, as obtained via introspection or ValidateJWT().
@Return %Status value for success (1) or an error status.
final classmethod CleanupTokenInfo(pCacheId As %String) as %Status
@API
Delete previously cached information about an OAuth token.
@Input pCacheId (required) Identifier formulated and managed by the logic that cached the information.
@Return %Status value for success (1) or an error status.
final classmethod GetTokenInfo(pCacheId As %String, Output pTokenInfo) as %Status
@API
Retrieve previously cached information about an OAuth token.
@Input pCacheId (required) Identifier formulated and managed by the logic that cached the information.
@Output pTokenInfo Array of simple information about the token and its storage:
pTokenInfo("token_cache_create_time") = Time when the item was cached, in NumericDate format.
pTokenInfo("token_string") = Bearer token string.
pTokenInfo("token_jwt_string") = JSON string representation of the token object.
@Return %Status value for success (1) or an error status.
final classmethod GetTokenInfoItem(pCacheId As %String, pInfoItem As %String) as %String
@API
Retrieve a specific previously cached information item about an OAuth token. This method Throws an exception upon error, as opposed to returning a %Status.
@Input pCacheId (required) Identifier formulated and managed by the logic that cached the information.
@Input pInfoItem (required) Item name. See GetTokenInfo() method documentation for valid values. @Return %String value for the requested item.
FeedbackOpens in a new tab