OAuthAPI.GetIDSubject
Get OAuth subject identifier of ID Token.
Syntax
GetIDSubject()
RETURNS STRING
NULL
may be returned if the metadata is not found.
Usage
Use this function to get the subject identifier of the Identity Provider securing the RESTful Web service. IdP subject information can be retrieved from the GWS engine once it has been initialized by OAuthAPI.init.
In case of error, a NULL
value will be returned.
OAuthAPI.GetIDSubject function
IMPORT FGL OAuthAPI
DEFINE sub STRING
MAIN
IF NOT OAuthAPI.init(5, "AF350CBC-8801-4DFB-9A78-A95B25BB32AF", "8JEq3HBfxrmj/8vMP66iaRQnGrWVyjqr" ) THEN
MESSAGE "Error: unable to initialize OAuth"
EXIT PROGRAM 1
ELSE
LET sub = OAuthAPI.GetIDSubject()
END IF
# ...
END MAIN