%SYS.TokenAuth
Class %SYS.TokenAuth Extends %Persistent [ Final, System = 4 ]
Properties
SID
Property SID As %String(MAXLEN = 24) [ InitialExpression = {$System.Encryption.Base64Encode($System.Encryption.GenCryptRand(18))} ];
Expires
Property Expires As %BigInt;
SecurityContext
Property SecurityContext As %String(MAXLEN = "");
AccessTokenHash
Property AccessTokenHash As %String(MAXLEN = 64);
RefreshTokenHash
Property RefreshTokenHash As %String(MAXLEN = 64);
GroupId
Property GroupId As %String(MAXLEN = "");
Methods
GenerateAccessToken
ClassMethod GenerateAccessToken(cspSession As %CSP.Session, Output info As %DynamicObject) As %Boolean [ Internal ]
ValidateAccessToken
ClassMethod ValidateAccessToken(jwt As %String, Output state As %List) As %Boolean [ Internal ]
RefreshToken
ClassMethod RefreshToken(token As %String, Output info As %DynamicObject, state As %List) As %Boolean [ Internal ]
RevokeTokensForSID
ClassMethod RevokeTokensForSID(sid As %String, groupId As %String = "") As %Status [ Internal ]
RevokeToken
ClassMethod RevokeToken(token As %String, Output state As %List) As %Boolean [ Internal ]
CreateTokens
Method CreateTokens(data As %DynamicObject, Output info As %DynamicObject) As %Boolean [ Private ]
ResetSystemJWKS
ClassMethod ResetSystemJWKS() [ Internal ]
CheckToken
ClassMethod CheckToken(jwt As %String, checkExpired As %Boolean = 1, Output session As %SYS.TokenAuth, Output body As %DynamicObject) As %Boolean [ Private ]
UpdateGroupId
ClassMethod UpdateGroupId(sid As %String, groupId As %String) As %Status
RevokeExpiredTokens
ClassMethod RevokeExpiredTokens() [ Internal ]
%OnBeforeSave
Method %OnBeforeSave() As %Status [ Private ]
%OnDelete
ClassMethod %OnDelete() As %Status [ Private ]
%OnOpen
Method %OnOpen() As %Status [ Private ]