Home > Class Reference > %SYS namespace > %OAuth2.Utils

%OAuth2.Utils

class %OAuth2.Utils extends %Library.RegisteredObject

Utility methods for OAuth 2.0 support. This class is used internally by InterSystems IRIS. You should not make direct use of it within your applications. There is no guarantee made about either the behavior or future operation of this class.

Methods

classmethod Base64UrlDecode(text As %String) as %Binary [ Language = objectscript ]
Decode base64url encoded string
classmethod Base64UrlEncode(bin As %Binary) as %String [ Language = objectscript ]
Encode binary value using base64url encoding
classmethod CheckScope(tokenScope As %String, scope As %String) as %OAuth2.Error [ Language = objectscript ]
Check that scope is subset of valid scopes for this token
classmethod CommaToList(str As %String) as %List [ Language = objectscript ]
Convert a comma separated list to a $list
classmethod IsAlgRSA(alg As %String) as %Boolean [ Language = objectscript ]
Check if apecified algorithm is RSA algorithm
classmethod IsAlgSymmetric(alg As %String) as %Boolean [ Language = objectscript ]
Check if apecified algorithm is symmetric
classmethod ListToComma(list As %List) as %String [ Language = objectscript ]
Convert a $list to comman separated list
classmethod LogCurrentSesssion(methodName As %String) [ Language = objectscript ]
Log the current session.
classmethod ObjectToJSON(object As %DynamicAbstractObject) as %Status [ Language = objectscript ]
Output JSON object to the current device
classmethod SelectLanguage(uiLocales As %String, domain As %String) as %String [ Language = objectscript ]
Select the language for Authentication Class localization.
uiLocales is the value of the ui_locales request parameter.
The return value is the selected language code.
Call looks like: Set language=##class(%OAuth2.Utils).SelectLanguage(properties.RequestProperties.GetAt("ui_locales"),domain)
classmethod UpdatePrivateJWKS(ByRef privateJWKS As %String, ByRef publicJWKS As %String) as %Status [ Language = objectscript ]
Update the private JWKS for client or authorization server with a new private/public key pair or each supported algorithm. UpdatePrivateJWKS is used to initially create the JWKS or to do key rotation.

Inherited Methods

%AddToSaveSet() %DispatchSetModified() %NormalizeObject()
%ClassIsLatestVersion() %DispatchSetMultidimProperty() %ObjectModified()
%ClassName() %DispatchSetProperty() %OriginalNamespace()
%ConstructClone() %Extends() %PackageName()
%DispatchClassMethod() %GetParameter() %RemoveFromSaveSet()
%DispatchGetModified() %IsA() %SerializeObject()
%DispatchGetProperty() %IsModified() %SetModified()
%DispatchMethod() %New() %ValidateObject()