This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// creating an instance of the authentication API | |
var authApi = new docusign.AuthenticationApi(apiClient); | |
var loginOps = {}; | |
loginOps.apiPassword = 'true'; | |
loginOps.includeAccountIdGuid = 'true'; | |
// making login call. we could also use DocuSign OAuth userinfo call | |
authApi.login(loginOps, function (error, loginInfo, response) { | |
if (error) { | |
return res.send(error); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const passport = require('passport'); | |
const util = require('util') | |
var session = require('express-session'); | |
var docusign = require('./src/index'); | |
const app = express(); | |
const port = process.env.PORT || 3000; | |
const host = process.env.HOST || 'localhost'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Configure Passport | |
passport.use(new docusign.OAuthClient({ | |
sandbox: true, | |
clientID: '{CLIENT_ID}', | |
clientSecret: '{CLIENT_SECRET}', | |
callbackURL: hostUrl + '/auth/callback' | |
}, | |
function (accessToken, refreshToken, user, done) { | |
// Here we're just assigning the tokens to the user profile object but we | |
// could be using session storage or any other form of transient-ish storage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const passport = require('passport'); | |
const util = require('util') | |
var session = require('express-session'); | |
var docusign = require('./src/index'); | |
const app = express(); | |
const port = process.env.PORT || 3000; | |
const host = process.env.HOST || 'localhost'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using DocuSign.eSign.Api; | |
using DocuSign.eSign.Client; | |
using DocuSign.eSign.Model; | |
using Microsoft.Owin.Hosting; | |
using Newtonsoft.Json; | |
using Owin; | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package docusign_tests; | |
import com.docusign.esign.api.*; | |
import com.docusign.esign.client.*; | |
import com.docusign.esign.model.*; | |
import com.docusign.esign.client.auth.AccessTokenListener; | |
import org.apache.oltu.oauth2.common.exception.OAuthSystemException; | |
import org.apache.oltu.oauth2.common.token.BasicOAuthToken; | |
import java.awt.Desktop; | |
import java.io.File; | |
import java.io.IOException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Construct the recipient token authentication assertion | |
// Specify ID, start time, method and domain | |
DocuSignWeb.RequestRecipientTokenAuthenticationAssertion assertion | |
= new DocuSignWeb.RequestRecipientTokenAuthenticationAssertion(); | |
assertion.AssertionID = new Guid().ToString(); | |
assertion.AuthenticationInstant = DateTime.Now; | |
assertion.AuthenticationMethod | |
= DocuSignWeb.RequestRecipientTokenAuthenticationAssertionAuthenticationMethod.Password; | |
assertion.SecurityDomain = "Request Recipient Token Test"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create the recipient | |
DocuSignWeb.Recipient recipient = new DocuSignWeb.Recipient(); | |
recipient.Email = "Test email"; | |
recipient.UserName = "Testing account"; | |
recipient.Type = DocuSignWeb.RecipientTypeCode.Signer; | |
recipient.ID = "1"; | |
recipient.RoutingOrder = 1; | |
// Need to specify captive info to embed the recipient | |
recipient.CaptiveInfo = new DocuSignWeb.RecipientCaptiveInfo(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Construct the recipient token authentication assertion and specify | |
// ID, start time, method, and domain | |
$assertion = new RequestRecipientTokenAuthenticationAssertion(); | |
$assertion->AssertionID = guid(); | |
$assertion->AuthenticationInstant = nowXsdDate(); | |
$assertion->AuthenticationMethod = RequestRecipientTokenAuthenticationAssertionAuthenticationMethod::Password; | |
$assertion->SecurityDomain = "Request Recipient Token Test"; | |
// Construct the URLs based on UserName | |
$recip = $env->Recipients[0]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create the recipient | |
$rcp1 = new Recipient();// First recipient to put in recipient array | |
$rcp1->UserName = "John Doe"; | |
$rcp1->Email = $Recipient1Email; | |
$rcp1->Type = RecipientTypeCode::Signer; | |
$rcp1->ID = "1"; | |
$rcp1->RoutingOrder = 1; | |
$rcp1->RequireIDLookup = FALSE; | |
// Specify captive info to embed the recipient |
NewerOlder