This is the README file for SAMPLES-SECURITY. The end of the file has setup instructions.
Use or operation of this code is subject to acceptance of the license available in the code repository for this code.
SAMPLES-SECURITY is meant for use with the InterSystems IRIS. This sample includes routines that you can copy and modify for specific purposes.
-
ZAUTHENTICATE.mac
is a sample routine that you helps you define delegated (user-defined) authentication. Copy and modify this sample to create your ownZAUTHENTICATE
routine. For details, see documentation. -
ZAUTHORIZE.mac
is a sample routine that you helps you define delegated (user-defined) authorization. Copy and modify this sample to create your ownZAUTHORIZE
routine. For details, see documentation. -
LDAP.mac
demonstrates calls to the%SYS.LDAP
class, which you would use as part of delegated authentication, in cases when you want to authenticate using the LDAP server. For details, see documentation. -
OAUTH2.ZAUTHENTICATE.mac
is another sample routine that helps you define delegated authentication, in this case, specifically for use within the OAuth 2.0 framework. Copy and modify this sample to create your ownZAUTHENTICATE
routine, as described in documentation.For details on this particular sample routine, see this page.
-
REST.ZAUTHENTICATE.mac
is another sample routine that demonstrates how to authenticate a REST application using OAuth 2.0. To use this sample:- Configure the resource server containing the REST application as an OAuth 2.0 resource server.
- Copy this routine to the %SYS namespace as ZAUTHENTICATE.mac.
- Modify value of applicationName in ZAUTHENTICATE.mac.
- Allow delegated authentication for %Service.CSP.
- Make sure that the web application for the REST application is using delegated authentication.
- Clone or download the repository.
- If you have not yet created a namespace in InterSystems IRIS, follow the detailed instructions to do so.
- Open the InterSystems IRIS Terminal.
- Enter the following command (replacing
mynamespace
with the namespace where you want to load the sample):
ZN "mynamespace"
- Enter the following commands (replacing with the full path of the
buildsample/Build.SecuritySample.cls
file):
do $system.OBJ.Load("full-path-to-Build.SecuritySample.cls","ck")
do ##class(Build.SecuritySample).Build()
- When prompted, enter the full path of the directory to which you downloaded this sample. The method then loads the sample code, but does not compile it.