Coder Social home page Coder Social logo

docusign / code-example-net-framework-auth-code-grant Goto Github PK

View Code? Open in Web Editor NEW
3.0 10.0 4.0 650 KB

OAuth Authorization Code Grant flow from a .NET Framework MVC application

License: MIT License

C# 12.90% CSS 0.19% ASP.NET 0.05% JavaScript 84.67% HTML 2.19%
csharp docusign oauth2 owin authorization-code-grant asp-net-mvc

code-example-net-framework-auth-code-grant's Introduction

NetFrameworkOAuth

This code example demonstrates how to use the OAuth Authorization Code Grant flow from a .NET Framework MVC application

Configuration

Create the Integration Key

Log in to your DocuSign developer account. If you don’t have an account, you can create a developer account for free. From your account menu on the Developer Center, choose My Apps and Keys and then select the ADD APP AND INTEGRATION KEY button. Name your app, and DocuSign will generate an integration key for it and open the app’s configuration page. Set the integration key to use the Authorization Code Grant flow. Add a secret key to the app. Secret keys are only shown once, when they’re created; so as soon as you add it, copy the key’s value and store it securely elsewhere. However, if you lose the value for this secret key, you can add a new one. Your app can have as many secret keys as you wish. Add a redirect URI to the integration key for the URL. This should fit the pattern code_example_url/ds/callback. The default URL for the application is https://localhost:44359. Therefore, the default redirect URI to be added to the integration key is: https://localhost:44359/ds/callback Update Project Url to https://localhost:44359/

Update the Web.config settings file

You now have two mandatory items and one optional item to add to the code example's Web.config file, which is at the top level of the code example's directory:

  • The integration key: add it as the ClientId setting.
  • The secret value: add it as the SecretKey setting.
  • The preferred account ID: add it as the RequiredAccount optional setting.

Using the code example

Run git clone https://github.com/docusign/code-example-net-framework-auth-code-grant.git

Build and run the application in Visual Studio.

VS will start an instance of IIS as the application's web server.VS will open your default browser to the application. Use the Authenticate with DocuSign option in the top navigation pane to start the authentication process. The browser will be redirected to the DocuSign Identity Provider (IdP) for the authentication and consent process. The browser is then redirected back to the application to complete the Authorization Code Grant flow. Use the Example option in the top navigation pane to send an envelope.

Use the Example option in the top navigation pane to send an envelope.

License and additional information

License

This repository uses the MIT License. Please see the LICENSE file for more information.

Pull Requests

Pull requests are welcomed. Pull requests will only be considered if their content uses the MIT License.

Additional Resources

code-example-net-framework-auth-code-grant's People

Contributors

dependabot[bot] avatar inbargazit avatar larryklugerds avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.