Access Token
Overview
When using an OpenID Connect (OIDC) authentication method with WorkflowGen, an OAuth 2.0 access token is available for server-side .NET development. This token enables you to make requests to the GraphQL API as well as to your own APIs, depending on your provider's configuration.
For instructions on how to configure an OIDC provider with WorkflowGen, see the WorkflowGen for Azure guide for Azure Active Directory or the WorkflowGen Technical Guide for Active Directory Federation Services (AD FS), Auth0, and Okta.
Using an access token in web form code-behind
You can get the current user's access token from the new this.CurrentUserAccessToken()
public instance method of the WorkflowPage
class (available since WorkflowGen.My version 4.6.0) in order to make calls from the code-behind to WorkflowGen's GraphQL API or to your own APIs. To do this, follow the example code below:
There are settings that need to be added to the WebForms web.config
file in order for this example to work. You must add the reference to the System.Net.Http
namespace and deactivate unobtrusive validation mode. Here is a minimal web.config
content that you can use:
Last updated