Expand my Community achievements bar.

Customize Authentication

Avatar

Level 1

Hello,

  I was surfing the Rights Management ES Help and found a very interesting sample PDF. You can find the Sample file here:

http://tourdelc.adobe.com/content/Services/RightsManagement/RightsManagement/ApplyPolicy/MarketAnaly...

  I want exact the same features to be applied in one of my projects but the help is not up-to the .NET Development level and hence, asking the questions. To understand my question in better manner, kindly have a look at the file and you will see this dialog box same as in here:

  1. How can I change the text and description on the pop-up authentication window?
  2. I have tried Encryption Service and able to apply password protection on the PDF but how can I achieve Username and Password both as in the attached sample?
  3. On submission, how can I validate the user with my own custom Web Service and apply the policy based on the return value?

  Any help would be greatly appreciated.

  Thank you,

JD

2 Replies

Avatar

Former Community Member
  1. How can I change the text and description on the pop-up authentication window?
    • You can customize parts of this dialog via the Rights Management server configuration
    • You can change - Welcome text, Username and Password labels
  2. I have tried Encryption Service and able to apply password protection on the PDF but how can I achieve Username and Password both as in the attached sample?
    • The dialog you are seeing is dispolayed when opening a Rights Managment protected PDF, it does not appear for a password protected document
  3. On submission, how can I validate the user with my own custom Web Service and apply the policy based on the return value?
    • If you know who invoked the web service, you would have to do a "lookup" against the LiveCycle User Manager based on the info captured to get the LiveCycle user information for use in your policy.

Regards

Steve

Avatar

Level 1

Hello Steve,

  Appreciate your quick response.

  1. Thank you so much for your reply. I have changed the Welcome Text, Username label and Password label by visiting Display Option under the Rights Management Server Configuration.

  2.  I have used Encryption Service & Rrights Management Service in order to apply the password on a PDF file. At first, I have used the following code to apply the policy which does not include the Authentication:

        Dim rmclient As New RightsManagementService.RightsManagementServiceService

        rmclient.Credentials = New System.Net.NetworkCredential("MyUsername", "MyPassword")

        Dim inDoc As New RightsManagementService.BLOB()
        Dim fs As New FileStream(Server.MapPath("Docs1115.pdf"), FileMode.Open)
        Dim len As Integer = fs.Length()
        Dim byteArray As Byte() = New Byte(len) {}

        fs.Read(byteArray, 0, len)
        inDoc.binaryData = byteArray

        Dim findPolicy As RightsManagementService.PolicySpec = rmclient.getPolicy("DevelopmentPolicySet", "DevelopmentPolicy")

        Dim outBytes As Byte() = rmclient.applyPolicyByPolicyId(inDoc, "Docs1115.pdf", findPolicy.policyId, Nothing, Nothing).binaryData
        Dim fsOut As New FileStream(Server.MapPath("PPDF1_Docs1115.pdf"), FileMode.OpenOrCreate)
        Dim objBinary As New BinaryWriter(fsOut)

        objBinary.Write(outBytes)

        fs.Close()
        fsOut.Close()

  I could not able to do that and hence, has to use the above code for Encryption Service in order to achieve that and here is code for that:

        Dim eClient As New EncryptionService.EncryptionServiceService

        eClient.Credentials = New System.Net.NetworkCredential("MyUsername", "MyPassword")

        Dim inDoc As New EncryptionService.BLOB()
        Dim fsIn As New FileStream(Server.MapPath("Docs2132.pdf"), FileMode.Open)
        Dim len As Integer = fsIn.Length()
        Dim byteArray As Byte() = New Byte(len) {}
        Dim outBytes As Byte() = New Byte() {}

        fsIn.Read(byteArray, 0, len)
        inDoc.binaryData = byteArray

        Dim passSpec As New EncryptionService.PasswordEncryptionOptionSpec()

        passSpec.encryptOption = EncryptionService.PasswordEncryptionOption.ALL
        passSpec.compatability = EncryptionService.PasswordEncryptionCompatability.ACRO_7
        passSpec.documentOpenPassword = "documentOpen"
        passSpec.permissionPassword = "permission"

        Dim outDoc As EncryptionService.BLOB = eClient.encryptPDFUsingPassword(inDoc, passSpec)

        Response.Redirect(outDoc.remoteURL)

  For some reason, I cannot get any Binary Data for outDoc BLOB variable! Hence, I have to redirect the page to the remoteURL and I am getting following screen for authentication which has randomly created filename! :

 

  To avoid this random one and to achieve the real athentication dialog box, I had this question.

  How can I apply authentication with the help of Rights Management Web Service?

  3. I want to validate the user against my database and do not want to have 100,000+ users in Rights Management Server. I have a custom Web Service to do so and wanted to know how can I do that on submission?