Skip to content

Commit 6c676e0

Browse files
committed
Added an example use of the OAuth2 Flow
1 parent 9e39900 commit 6c676e0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/src/client/oauth2.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@ part of github.client;
22

33
/**
44
* OAuth2 Flow Helper
5+
*
6+
* **Example**:
7+
*
8+
* var flow = new OAuth2Flow("ClientID", "ClientSecret");
9+
* var authUrl = flow.createAuthorizationURL();
10+
* // Display to the User and handle the redirect URI, and also get the code.
11+
* flow.exchange(code).then((response) {
12+
* var github = new GitHub(auth: new Authentication.withToken(response.token));
13+
* // Use the GitHub Client
14+
* });
15+
*
16+
*
517
*/
618
class OAuth2Flow {
719
/**

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy