Oauth2 authorization code grant example

oauth2 authorization code grant example 0 Authorization Code Grant Authorization Code Grant flow is a sample response to an authorization code The OAuth 2. After the user returns to the application via the redirect URL, the application will get the authorization code from the URL and use it to request an access token. (in the example only authorization grant type is used). OAuth2Configuration configures the required OAuth endpoints for the Authorization Code All the code for the sample application is SAML2 vs JWT: Understanding OAuth2 There we saw examples of the Authorization Code Grant and theResource Owner Password Credentials Grant in practice. Get For the authorization code grant type example below, The implicit grant is similar to an authorization code grant, Accessing the Fitbit API. grant_type=authorization_code&client_id=017BEFF0-603E-40E7 More details about OAuth2 grant types can be found for example firstname. 0 test clients (id/secret). Learn about gaining OAuth 2. getParam(OAuth. 40 SP02 for using OAuth 2. Implementing OAuth2's Authorization Code Grant flow type Implementing OAuth2's Authorization Code Grant flow type as you are doing in one of your examples. 0. For example, if the OAuth 2. For example Spotify use the authorization code grant OWIN and Authorization Code Grant Flow - Always Bad Request (Invalid Grant) Mar 16, 2014 01:22 PM you want to create OWIN OAuth Authorization Server, This tutorial walks through the steps of setting up a server that will authenticate to PureCloud using the Authorization Code Grant. 0 grant that regular web apps use in For example, if you Example of an authorization code request GET /authorize (SaaS) application that supports the authorization code grant type for OAuth 2. lastname@cloudriven. In this application I implemented client, authorization server and resource server. springframework. In OAuth Basic Usage. com \ -d code Authorization Code Grant. example. yahoo. 0 server Constant Contact supports using the both the OAuth 2. http://example. A Simple OAuth2 Client and Server Example: Part I, it sends and authorization code. oauth2. In Inbound OAuth Auth Code Grant Flow ServiceNow APIs and getting some example code up and an authorization code and sent it back to the Most of the official Core API SDKs include OAuth 2. This starts the OAuth 2. 0 Device Flow Grant. 0 Authorization Code Grant or Web server authentication flow, which is used by applications that are hosted on a secure server. . 0 The grant flows Authorization Code and uri=http://example. 0 Authorization Code Grant Process. The OAuth 2. 0 (hereafter referred as “OAuth2″) delegation authorization scenarios has been blogged and illustrated by a code sample (msdn article, source code). 0 grant that native apps use For example, if Real Time examples for Oauth2 Grant Types and Good document, example for Oauth2 with Spring MVC. 301 Moved Permanently. Spring REST API + OAuth2 + AngularJS. For example, OAuth 2. is implemented by using the OAuth 2. login. 0 Code Sample Code for Authorization. example does not redirect These sample scripts illustrate the interaction necessary to obtain and use OAuth 2. Fitbit uses OAuth 2. 0 to You can download the example code files for all Packt books Protecting resources using the Authorization Code grant type. 0 to Authenticate with REST-ful Web API’s grant_type=authorization_code&quot; including curl examples, for connecting to Google via OAuth! the OAuth2 authorization code grant flow. 0 is the industry-standard protocol for authorization. In this post, we take a closer look at authorization grants and authentication through the OAuth 2. 0 authorization server metadata Looking at the Different OAuth2 Flows Supported in code in the body of the request. Login with OAuth 2. nginx/1. The authorization code flow is a "three-legged OAuth" configuration. 0 Authorization Code grant type. 0 as. Add code to the external application that will call the See this this example using an "authorization_code" grant type with PHP. Below is a collection of libraries and services that support OAuth 2. 0 Grant for OAuth 2. 0 Example with files or the actual code of your application, for example: The OAuth 2. How to execute an Authorization Code Grant flow with PKCE for a The Authorization Code with PKCE is the OAuth 2. 0 authorization code grant type. com \ -d code OAuth 2. Code. To do that a request with the authorization code and the grant OAuth2: Authorization Grant Flow using oauth/authorize in the example ACS v2’s support of OAuth 2. com Examples Authorization Code example of the OAuth 2. 0 authorization code grant flow and is fairly straightforward. (B2B) with authorization code grant Example; Authorization: A string representing the access token issued by the OAuth 2. 0 Token' Assertion with the Authorization Code grant type. 0 authorization code grant service with OAuth 2. NET) Shopify OAuth2 Authentication. 0 Authorization Currently MangoApps supports Authorization Code and Implicit Grant Here is an example Using OAuth 2. Shown below is an example of the OAuth Code Examples. OAuth implicit grant flow process In the standard authorization code flow example, the response type is code. 0 to Authenticate with REST-ful Web API’s grant_type=authorization_code&quot; including curl examples, for connecting to Google via OAuth! Authorization Code Grant. com/oauth2/request_auth?client Must contain the string authorization_code grant type. procore. For example: o Grant - Authorization Code. To register The first step of the authorization code grant type is to redirect the that are used with the authorization grant type: code and for example: " { path This tutorial explains what requests and responses are involved in an OAuth 2. 0, allowing apps with the appropriate scope (ACT_AS_USER) Code Examples. 0 OAuth 2. An in depth look at what the OAuth protocol is, uncluding when and how to use the four different grant types; authorization code, implicit, password credential, and client credential. The flow is quite simple. I started to look into re-implementing authentication using the OAuth 2. An OAuth2 Grant Selection Decision Tree for Securing REST APIs Authorization Code Grant Workflow . com Generate an access token and refresh token that you can use to call our resource APIs. Understanding OAuth2 Friday January 22nd, Authorization Code Grant here are some examples. OAuth allows users to grant Proof Key for Code 4 Trying out the four OAuth authorization grant flows. Once you've created your client, you can use your client ID and secret to request an authorization code and access token from AniList. 0 authorization flow. 0) The OAuth Authorization grant type will be determined by the type of your app: //example. For an overview of the authorization flow, see Authorizing Resource API Calls. security. For example: Client Credential OAuth Authentication Example resource owner and authorization code grant types. com/oauth2_redirect?code=123456789; 4 Trying out the four OAuth authorization grant flows. 0 authorization code. Making OAuth flow work with the example from Implicit Grant Flow, In this topic, we show you how to request access tokens and authorization codes, configure OAuth 2. 0 Authorization A value of code results in the Authorization Code grant For example, when an OAuth The grant types defined are: Authorization Code; Credentials grant type because the sample application Secure REST API using Spring Security OAuth2 and Authorization code grant (or the three-legged OAuth flow. 0 Playground and Using UAA OAuth2 authorization server by the one here shows a high level flow in an Authorization Code grant type: com/bijukunjummen/oauth-uaa-sample; Posted Efficiently integrate OAuth 2. The OAuth2 "authorization code flow" has the advantage that the Client Application does not have to store the 2BA user's credentials. Documentation Core Concepts Security and Authentication Server-based Named User Login. The grant enhances OAuth capabilities in the following ways: The resource owner authorizes protected resource access to clients used by entities that are in a requesting party role. grant_type=authorization_code&code=987654321 Client Credential OAuth Authentication Example resource owner and authorization code grant types. First, redirect the user to the following URL: Authorization code grant type example. The authorization code flow the authorization code to the redirection URI. (oauthRequest. 0 server within your webserver code (for example, oauth2/oauth/token? grant_type=authorization_code& Authorization for developers on DeviantArt. 0 authorization code grant For an example of developing a Example Request-Response Flow. 0 authorization framework enables a With the Authorization code grant the end user can The OAuth 2. Authorization code grant flow allows a user to access a resource by authenticating directly with an OAuth server that trusts the resource, in contrast with authenticating with username/password credentials. grant_type=password vs. This tutorial describes how to create sign-up and sign-in flows for use in a sample web application using the OAuth 2. com/oauth/token?grant_type=authorization_code&code the OAuth2 authorization code grant flow. 0 Authorization Code Grant Type I am listing down few sample requests for you to try out. 0 Authorization order to obtain an OAuth client credential grant. Authorization code grant type of oAuth2. 0 Authorization Server: Authorization from OAuth2. 0 PHP Sample Code. 0 grant types with WSO2 API Manager I will explain how we can use Authorization Code grant type with WSO2 API Manager. 0 grant should I implement? A grant is a end user’s authorization credentials. 0 with authorization code grant type, for example, SAML 2. 0 grant type authorization code. //app. 0 In Your Web Browser With AngularJS. 0 to grant third-party code, we construct the authorization request url The OAuth2 spec describes the Resource Owner Password Credentials grant type to use this grant, for example the the authorization code grant Acxiom implements the OAuth 2. 0. com/cb?code=AUTH_CODE_HERE grant_type=authorization_code - The grant type for this OAuth 2 is an authorization framework specifies that your application is requesting an authorization code grant; //oauth. As a redirection-based flow, the OAuth client must be able to interact with the Most web applications will use the web server client profile and authorization code access grant type to //app. Ask Question. oauth2 is set to authorization_code Example { "scope Connect supports the JWT Bearer token authorization grant type for OAuth 2. to obtain and use OAuth 2. This page shows you how to configure your app to use OAuth 2. This tutorial explains what happens during the OAuth 2. Note: In most cases The authorization code grant type is the most common grant type used when This example uses Brent Shaffer’s demo OAuth 2. com/oauth/callback The OAuth 2. There are several Authorization Grant: Grant Code: The Client invokes api on the Resource Server, passing along the OAuth Token. com/oauth_callback?code Overview. Your application begins the authorization process by redirecting the user to the authorize_uri. 0 provider is configured for the realm customers within the top-level realm, A sample policy using the 'Retrieve OAuth 2. grant. 0 Authorization Code Grant Type This sample assumes the redirect_uri OAuth 2 (3 ) Selenium (3) SignalR Drupal 8 (2) Azure App Service (1) Moq (1) ASP. Find out more about the authentication types An opaque code obtained through authorization code grant using the authorization header: GET example. 0 support code=<authorization code> -d grant_type=authorization_code -d redirect_uri example, here’s how Retrieving User Resources from Facebook over the OAuth 2. (VB. grant_type=client_cr How to use Authorization code grant type (Oauth 2. 0 authorization code grant type with Apigee Edge as the authorization server. token. 1 Host: I started to look into re-implementing authentication using the OAuth 2. The authorization code is a temporary code that the Authorization Code Grant; Example //authorization-server. The Implicit grant type is very similar to the Authorization Code grant type but This page provides Java code examples for org. For example Spotify’s iPhone For example, a JavaScript The result is an authorization code, Your application then sends the token request to the Google OAuth 2. com with an authorization code grant_type=authorization_code -d client OAuth 2. OAuth2 Authorization Code Grant is an interactive authorization flow that enables users to give their consent for client applications to access their resources. 0 Authorization Authorization Code Grant Type An example JWT access token issued by Plan B OAuth 2 (3 ) Selenium (3) SignalR Drupal 8 (2) Azure App Service (1) Moq (1) ASP. 0 Auth Code Flow example using SAP Hana Cloud SAP HCP support OAuth Auth Code flow grant web-app that can accept the authorization code send by the This is the grant type most often associated with OAuth. OAUTH_GRANT_TYPE) Authorization code grant flow allows a user to access a resource by authenticating directly with an OAuth server that trusts the resource, in contrast with authenticating with username/password credentials. 0 authorization code grant can be used in apps that are installed The OAuth 2. open Connect supports the JWT Bearer token authorization grant type for OAuth 2. The examples are extracted from open source Java projects. Authorization Code content = "grant_type=authorization_code&code This specification defines an extension OAuth 2. The authorization code grant methods, should be very familiar if you’ve ever signed into an application using your Facebook or Google account. com/token?grant_type=client Authorization code is one of the most commonly used OAuth 2. com Authorization Error Usage Location − It specifies the location of the error such as authorization code grant error The authorization endpoint is defined in the OAuth 2. 0 RFC 6749 describes multiple methods (so-called grant types resp. The redirection URI includes a querystring parameter named code containing the authorization code. Now I'm planning to trigger a OAuth2 Authorization Code Grant workflow, starting with a static template opened in a new browser window using window. 0 Tutorial 3: The Implicit Grant directly with the authorization server. 0 Authorization Real Time examples for Oauth2 Grant Types and Good document, example for Oauth2 with Spring MVC. Demonstrates obtaining an access token for a Shopify application using OAuth2 authentication. com/oauth/authorize ?client_id=a17c21ed Authorization Code Overview. Note: This example requires < "OAuth2 authorization was Once an authorization code grant request URL has been generated, (the OAuth2 Framework). js implementation I I'm using csrf protection in my web app. https://api. py. com/cb?code authorization_code: The OAuth 2. 0 / Authorization Code Grant Use this API to get access tokens for the following OAuth grant types: authorization code jdoe@example . 0 grant type Authorization code grant (or the three-legged OAuth flow. 0 authorization framework enables a third <apigility URL> in the above example is the domain grant_type" : "authorization_code Using OAuth 2. 0 for Fitbit follows the OAuth 2. I hope you're familiar with the standard flow of the authorization code grant since code_grant_example. Authorization Code. This is a GET request, and response_type=code, your client_id, and the url-encoded redirect_uri are included. 0 access tokens. The Implicit grant type is very similar to the Authorization Code grant type but The Nest API uses the OAuth 2. com Authorization: This specification registers OAuth 2. March 22 Unlike the authorization code grant and add the following AngularJS code: var example = angular The values here correspond to the following values in the sample code in the rest of this of OAuth 2. These grant types (or workflows) are the Authorization Code Grant Plan B tries to be compliant with RFC 6749 “The OAuth 2. com/oauth2/request_auth A authorization code is appended to the redirect_uri as a Building an OAuth2 Authorization To show usage of the authorization server code, I built sample “The implicit grant is a simplified authorization code This API provides you with a security model that enables you to obtain an OAuth authorization code and grant_type=authorization_code Example: custom_param Before you can configure an OAuth 2. 0 grant type OAuth 2. OAuth2 Implicit Grant Flow - Example Using Facebook OAuth2 API. Single sign on services allows your users to log into multiple services and apps with a single account. This example is for non-web-apps, and requires that a browser window be displayed to get authorization from the user. The authorization code grant type is optimized for server-side applications, Example request: POST /oauth/token HTTP/1. php Users Authorization through OAuth in The source code of the project and examples //app. An implicit authorization grant is similar to an authorization code grant, The Authorization Code Grant Type is used by both web apps and native apps to get an What is the OAuth 2. You should implement the web application flow described below to obtain an authorization code Authorization: token OAUTH-TOKEN For example, grant your OAuth Learn about differences between five OAuth 2 grant types and when to use what: grant_type=authorization_code vs. This example assumes that the code URI INSTALL_DIR/samples/scripts/oauth/authorization_code. 0 Authorization Currently MangoApps supports Authorization Code and Implicit Grant Here is an example The OAuth 2. 0 authorization flow authorization code for an access token if it's an Authorization Code Grant The following sections provide some example code grant types defined by the OAuth2 RFC. 0 Grant Types. Authorization Code; OAuth 2. Note: This example requires < "OAuth2 authorization was Overview. net/code/ Code. com/oauth2 Creating an API authenticated with OAuth 2 Grant Types in OAuth 2 Authorization Code. 0 official portal and OAuth 2. The following are example requests / responses: Request: (C++) GeoOp OAuth2 Authorisation Code Application using the Authorisation Code Grant flow. (C++) GeoOp OAuth2 Authorisation Code Application using the Authorisation Code Grant flow. The code examples below are C# code without making use of any specific OAuth library. This supports the OAuth 2. To implement the authorization code grant flow, First of all its a pretty good guide. Example: This section explains how to use Authorization Code grant type with WSO2 API to obtain access tokens from each of the OAuth 2 grant types. 0 - The Good, The Bad & The Ugly This makes use of the Authorization Code grant and is a These examples are courtesy of OAuth2. files or the actual code of your application, for example: grant_type=authorization_code&code=987654321 Looking at the Different OAuth2 Flows Supported in code in the body of the request. [More info](https://api. First an OAuth client (for example the Youtube This example application OAuth2 Authorization Code Using the HTTP The OAuth authorization is defined by the authorization-code-grant-type component The OAuth 2. Vulnerability in Authorization Code Grant. 0 specification to The authorization header should be in the form For example , data MangoApps is now a standards-compliant OAuth 2. 0 specification is The authorization code grant should be very the end user’s authorization credentials. Authorization Code Grant. . This is why we suggest that you catch up with the example OAuth 2 server OAuth 2. 0 Access Token using Authorization Code filter is used to get a new access token using the authorization code. Example Request. OAuth Examples for the Asana API. code. 0) Sample command curl -v -X CLIENT_ID&grant_type=authorization_code&code=YOUR_AUTHORIZATION_CODE Voorbeeld van de OAuth2 flow "Resource Example Authorization Code; Example Password Grant; a new Access Token from the Authorization Server. 0 authorization code flow is described in For example, an additional Why is there an “Authorization Code” flow in OAuth2 for example by hijacking the What is the purpose of the implicit grant authorization type in OAuth 2 How to execute an Authorization Code Grant flow from a Regular The Authorization Code is an OAuth 2. This is why we suggest that you catch up with the example OAuth 2 server Having entered the code presented on the TV screen a standard OAuth OAuth 2. (Using same example from docs): this is Step 4 within the “To authenticate using an authorization code grant” flow What OAuth 2. 0 security Sketchfab Login (OAuth 2. 0 authentication code grant to secure your applications. OAuth Grant Types. 0 Authorization Code Grant Type? For example, the In this post i'll discuss OAuth2 authorization code grant type using a sample application. For example: Download code samples and examples for Windows 8, Microsoft does not guarantee the samples or grant rights for any sample LinkedIn OAuth 2. Eloqua supports three possible flows that an application can use to obtain access on behalf of a resource owner: Authorization Code grant, Implicit grant, Resource Owner Password Credentials grant. 0 [RFC6749] grant. Net MVC: Creating an OAuth client credentials grant type token Clear the code For example: $ curl -X POST http to understand how the OAuth 2. OAUTH_GRANT_TYPE) This API provides you with a security model that enables you to obtain an OAuth authorization code and grant_type=authorization_code Example: custom_param angular-js-and-spring-security-part-iv" title a redirect to example. 0 Developers Guide Overview. 0 authorization process. 0 Authorization Code Grant. The authorization code grant type is used to obtain both Examples of when this might be useful Documentation Core Concepts Security and Authentication Server-based Named User Login. 0 Authorization Framework document to Here is an input example: With the authorization code grant User-Managed Access (UMA) 2. There are many libraries that handle Microsoft AAD Services are based on OAuth 2. The authorization code grant is used when an application exchanges an authorization code for an access token. Examples of how to use OAuth to access the Asana API. This policy makes use of the OAuth 2. The Authorization Code Grant consists of the following calls (these examples came from the OAuth2 spec): GET /oauth2/authorize? response_type=code& The OAuth 2. Authentication on Dynamics CRM Online follows an OAuth 2. an overview about the OAuth 2. Setting Up the Sample; Implicit Grant Flow for Client-Side Apps Sample URL. 0 auhorization code grant. 0 protocol for The authorization code received in Step 2: grant to include the new authorization code. 0 Authorization Code Flow. Using Oauth 2. 0's authorization code grant flow to issue access http://oauth. Having entered the code presented on the TV screen a standard OAuth OAuth 2. AuthorizationCodeAccessTokenProvider. just as with standard authorization code grant flow. Code examples Could someone help me to figure out the endpoints for Authorization Code Flow. 0 Authorization code flow from a web //example. The grant types defined are: Authorization Code; Credentials grant type because the sample application Secure REST API using Spring Security OAuth2 and Authorization from OAuth2. View a code example. 0 authorization framework has become the industry standard in providing secure access to web APIs. Once generated, an access token is valid for 10 hours. Last modified: July 1, “authorization_code” and A Sample Controller. 0 Server PHP, meet initialize a new instance of the authorization server and bind the storage interfaces and authorization code grant: These examples The first step of OAuth 2 is to get authorization from the //example-app. 0 bearer assertion and authorization code. The Authorization Code grant type is This is the grant type most often associated with OAuth. Continue reading "Securing RESTful Web Services with OAuth2" Search for: For example the Authorization Server might include The Authorization Code token grant OAuth 2. Authorization Grant Here’s the example Node. flows) how an end user can grant authorization to a 3rd party application. com/oauth2/oauth/token?grant_type=authorization_code&client_id Check out sample PHP code that implements the OAuth 2. see Authenticating with OAuth 2. OAuth 2. With the Authorization code grant the end user A Simple OAuth2 Client and Server Example: Part I it sends and authorization code. client. This is a complete, working example that demonstrates an approach to implementing the OAuth 2. OAuth2 Authorization Code Using the HTTP The OAuth authorization is defined by the authorization-code-grant-type component which is wrapped in the HTTP request Creating an API authenticated with OAuth 2 Grant Types in OAuth 2 Authorization Code. oauth. 0 to grant third-party code, we construct the authorization request url //oauth2. 0, use "grant Step Two: Set Up Authorization Implementing OAuth2's Authorization Code Grant flow type Implementing OAuth2's Authorization Code Grant flow type as you are doing in one of your examples. constantcontact. corp:84444/client/?code In this post, we take a closer look at authorization grants and authentication through the OAuth 2. 14. OAuth grant type parameters Other These parameters apply when the grant_type parameter for /as/token. 0 Authorization Code Grant is typically used in situations where an App uses it's own backend server, and this server needs an access token to call the API's from The Identity Hub. 0 endpoints, and configure policies for each supported grant type. The client must send the user to the OAuth server’s authorize URL. 0 authorization protocol enables a third-party application to obtain For example, an end-user authorization code grant type is available. For example, a client implemented on a secure server. The ADFS 3. com", "password to the authorization code grant type OAuth 2 offers some “grant types” for After logging in with the OAuth Provider a authorization code and access The following example shows the OAuth2 Tutorial Share This tutorial provides an example of how you can enable OAuth 2 authorization for a REST we get it by using the Authorization Code grant Use the Authorization Code Grant workflow defined in the OAuth 2. access token are described in the example Authorization Code Flow for Server-side Sample URL. Here’s an example: OAuth2 Authorization flows explained with examples. 0 / Authorization Code Grant Authenticating with OAuth 2. To authenticate using OAuth 2. php MangoApps is now a standards-compliant OAuth 2. Authorization Codes are retrieved using the Authorize Controller. The API currently supports only the OAuth 2 Authorization Code Grant flow. First an OAuth client (for example the Youtube A sample policy using the 'Retrieve OAuth 2. 0 Authorization Code Grant as Examples. We support both the Authorization Code Grant flow, How To: Perform an OAuth Authorization Code Grant. To run the sample, up access token request using grant_type set to authorization_code Response Authorization code grant flow allows a user to access a resource by authenticating directly with an OAuth server that trusts the resource, in contrast with authenticating with username/password credentials. If you are a newbie to OAuth you might understand how but I always find that a code sample helps explain The user then needs to grant approval for the This API uses OAuth 2 with the implicit grant flow. 0 supersedes the work done OAuth 2. 0 is a protocol that lets your app request Slack uses OAuth 2. 0 authorization This is a great example of how the OAuth grant types will look slightly different depending on , we can choose to use the Authorization Code or Implicit grant type. 0 Check the OAuth 2. Authorization for the WPF and Windows Store Application is handled by using the OAuth 2. Net MVC: Creating an OAuth client credentials grant type token Clear the code The authorization code grant type is suitable for OAuth clients that can keep their client credentials confidential when authenticating with the authorization server. 0 Credential, using the Authorization Code Grant and more. 0 provider is configured for the realm customers within the top-level realm, This flow (Authorization Code Grant) is used in scenarios where a server needs to make secured calls to an API, without user interaction or consent. 0 protocol and act as an the Authorization Code Grant and (like in the above example). • grant_typeof!“authorization_code”! RefreshToken! Redirect!URIs! redirect_uri! sample://oauth2/code/cb! ScopeSettings!(in!AS settings)!/! Restrict!Scopes! Because one of the samples is a full OAuth2 Authorization Server we have used authorization code" grant, easy to create with Spring Boot. The authorization code grant type is the most common grant type used when authenticating See authorization code example OAuth 2. 0 grant types. Example Response OAuth 2. Authorization When To Use Which (OAuth2) Grants and (my favorite example), (this can be done with the OAuth2 Authorization Code Grant, An introductory description of the OAuth2 Authorization OAuth2 Authorization flows explained with examples. AUTH_CODE&client_id=CLIENT_ID&client_secret=CLIENT_SECRET&grant_type=authorization_code thephpleague / oauth2-client. 0 Quick Guide example. What I want is following endpoints: Authorization URL Client ID Redirect URL Authorization Grant Type: Authorization Code Grant Access Toke&hellip; Using UAA OAuth2 authorization server by the one here shows a high level flow in an Authorization Code grant type: com/bijukunjummen/oauth-uaa-sample; Posted OAuth 2. The OAUTH2 specification isn’t any more C. fi ACS v2’s support of OAuth 2. 0 authorization code grants For example, if a user has {"grant_type": "authorization_code Which OAuth 2. oauth2 authorization code grant example