How to setup and use the Signing Form REST API

  • 7024693
  • 19-Jun-2020
  • 19-Jun-2020

Environment

Self Service Password Reset 4.4

Situation

Resolution

Follow the steps below


Create a new profile for New User Profiles. In this example we created a new profile named guest.

Modules Public New User Registration New User Profiles guest

Now we need to make a few changes to the default values of this new profile.

For each of the fields you must set their type to hidden.


After making this change then edit each of the fields by clicking the Options button.

Modify the field parameters and set the value to “Read Only”



Now save these new settings.

For the injection we must send the signed data to this new profile.


First create the signed data with the REST call. This can be done with SLAnalyzer or with CURL.

///

For SLAnalyzer, click on tools/SSPR REST Client, enter server url, SSPR user credentials, then scroll down and select the Post Signingform REST call.


Click the Parameters button and click either yes or no to enter JSON or URLEncoded data. In this example we chose Yes and pasted in {"givenName":"jason","sn":"rivardddd","mail":"sdasdsa@example.com"}

Then click the Execute button to send the REST call to the server. The server will then return the signed data.

{

"error":false

"errorCode":0

"data":"H4sIAAAAAAAAAAGcAGP_UFdNLkdDTTEQ14Ey-CNr_mMGHnlIZE4EddhPLEC5HbNkoIRbWF1_4ndWU9vZ0dPx8nZ0OWhJSi_7TKheqJcssH2ot2Xj64-F0r4HcRW-FKrZaNbcwZ7tRKZpS2vepJw5VCinYSjacyqjGJZZxrclZqP_QtQdRug1e60ifPRi1o6x9gTOvpel6qrYS-Lq6hddN-6uj33uSz-l7vmCg9e255wAAAA="

}

///

For CURL:

C:\>curl -kv --header "Content-Type: application/json" --user "administrator:**********" -X POST -d "{"givenName":"jason","sn":"rivardddd","mail":"sdasdsa@example.com"}" "https://sspr45.gmadr2.novell.com/sspr/public/rest/signing/form"

///

Take the signed data returned by the REST call and submit it to newuser guest profile with the syntax

<server URL>/sspr/public/newuser/profile/guest?signedForm=<output from signedformdata rest call>

For example:

https://sspr45.gmadr2.novell.com/sspr/public/newuser/profile/guest?signedForm=H4sIAAAAAAAAAAGcAGP_UFdNLkdDTTEQ14Ey-CNr_mMGHnlIZE4EddhPLEC5HbNkoIRbWF1_4ndWU9vZ0dPx8nZ0OWhJSi_7TKheqJcssH2ot2Xj64-F0r4HcRW-FKrZaNbcwZ7tRKZpS2vepJw5VCinYSjacyqjGJZZxrclZqP_QtQdRug1e60ifPRi1o6x9gTOvpel6qrYS-Lq6hddN-6uj33uSz-l7vmCg9e255wAAAA=

You can submit this with a browser by pasting it into the URL/Address field and then navigate or you can use SLAnalyzer.

With SLAnalyzer just scroll down to the option "Inject Post Signing Form Data", Click the Parameters button and then paste in the full URL.

Then click the Execute button to submit the data to the server.


Whether using a browser or SLAnalyzer you should see a browser window display the progress bar as it is creating and syncing the data to the LDAP directory.


Additional Information

Additional notes:
1. For this to work without any input from the user, then don’t enable the option to prompt for password in the new profile. If you do then the user will be prompted to enter a password.
2. If the user will need to enter a token for validation then modify the new user email template to point the user to the correct profile or the email link will not be valid.

SLAnalyzer is a tool from Micro Focus customer support. It can be downloaded from ftp://ftp.novell.com/pub/SLAnalyzer/SLAnalyzer.exe