• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit Search
0

PDF Form Javascript Submit Add Authentication

Community Beginner ,
Feb 20, 2023 Feb 20, 2023

Copy link to clipboard

Copied

Hi,

 

We are using PDF forms to submit the whole PDF into our server using the following.

 

this.submitForm({
cURL:'{serverURL}',
cSubmitAs: 'PDF'
})

 

We need to implement some authentication over this submit form functionality. Is it possible to implement any authentication over this submit. 

 

TOPICS
JavaScript , PDF forms

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 20, 2023 Feb 20, 2023

Copy link to clipboard

Copied

What kind of authentication, exactly?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 20, 2023 Feb 20, 2023

Copy link to clipboard

Copied

We are giving the PDF Forms to the users in our organization. We need to make sure that nobody outside the organization is able to submit the PDF to our server.

Is it possible to implement oauth2 authentication? If not then can we have add some device information(device account name, Adobe Id, email) along with the Submit URL so that we can validate the User.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 20, 2023 Feb 20, 2023

Copy link to clipboard

Copied

I suggest you look into using Certificates to make sure only people in your organization access the file, then.

If you want to enforce some kind of authentication you would need to do it on the server-side, though.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 20, 2023 Feb 20, 2023

Copy link to clipboard

Copied

Acrobat JavaScript is designed to essentially make this impossible. Consider: someone might download a form from anywhere and submit it, for some apparently harmless activity. It would be very bad if a downloaded "phishing" form could harvest emails, account names, etc. So you cannot pick up any kind of personal info to use in a submission.

 

I think you need to move towards working on a server that the user already authenticated to. And using HTML forms, since PDF forms cannot inherit any authentication. The form must be resident on the server because the server would be setup using CORS to forbid submission to it from externally hosted forms.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 20, 2023 Feb 20, 2023

Copy link to clipboard

Copied

LATEST

You cannot implement oAuth with regular PDF submits, but you could do an ad-hock authentication.  

Use scripts to perform a submit handshake. When the user presses the submit button it ask them for credentials (name/password), and submits these to the server. The return data contains a code that either allows the full submit or blocks further processing.  This is a somewhat weak protection, since the script could be reverse engineered. But it would keep all but the most motivated from misusing the form.   Addition protection could be added by using public key encryption on the return authorization code. 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines