You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To make integrations with eBay RESTful APIs easier, eBay provides client libraries in C# and Java to make it simpler to set up authorization, reduce the amount of code the application developers have to write to get OAuth Access Tokens.
7
-
This library in addition to functioning as a simple eBay OAuth Client, helps with additional features such as cached App tokens.
3
+
To make integrations with eBay RESTful APIs easier, eBay provides client
4
+
libraries in C# and Java to make it simpler to set up authorization,
5
+
reduce the amount of code the application developers have to write to
6
+
get OAuth Access Tokens. This library in addition to functioning as a
7
+
simple eBay OAuth Client, helps with additional features such as cached
8
+
App tokens.
8
9
9
-
== What is OAuth 2.0
10
-
https://tools.ietf.org/html/rfc6749[OAuth 2.0] is the industry-standard protocol for authorization to obtain limited access to an HTTP service. All https://developer.ebay.com/docs[eBay RESTful APIs] use the OAuth 2.0 protocol for authorization.
11
-
OAuth access tokens verify to eBay that a request is coming from a valid client and that the application has the user's authorization to carry out the requests. Learn more about the https://developer.ebay.com/api-docs/static/oauth-tokens.html[OAuth Access Tokens].
10
+
# What is OAuth 2.0
12
11
13
-
== Supported Languages
14
-
eBay OAuth Client is a class library that targets the .NET Standard 2.0. This library can be used by any .NET implementation that supports 2.0 version of the .NET Standard.
12
+
[OAuth 2.0](https://tools.ietf.org/html/rfc6749) is the
13
+
industry-standard protocol for authorization to obtain limited access to
14
+
an HTTP service. All [eBay RESTful
15
+
APIs](https://developer.ebay.com/docs) use the OAuth 2.0 protocol for
16
+
authorization. OAuth access tokens verify to eBay that a request is
17
+
coming from a valid client and that the application has the user’s
18
+
authorization to carry out the requests. Learn more about the [OAuth
Use of this source code is governed by https://opensource.org/licenses/Apache-2.0[Apache-2.0 license].If you're looking for the latest stable version (2.0.0), you can grab it directly from NuGet.org.
20
-
[source,xml]
24
+
eBay OAuth Client is a class library that targets the .NET Standard 2.0.
25
+
This library can be used by any .NET implementation that supports 2.0
26
+
version of the .NET Standard.
27
+
28
+
# Add the eBay.OAuth.Client NuGet Package
29
+
30
+
**Current Version** : 2.0.1
31
+
32
+
Use of this source code is governed by [Apache-2.0
- After cloning the project, you can build the package from the source
108
+
by executing following script from project directory:
60
109
61
-
== Build eBay.OAuth.Client DLL from Source
110
+
<!---->
62
111
63
-
- After cloning the project, you can build the package from the source by executing following script from project directory:
64
-
[source,shell]
65
-
./build.sh
112
+
-**ebay-oauth-csharp-client.dll** will be created at
113
+
ebay-oauth-csharp-client/bin/Debug/net6.0
66
114
67
-
-**ebay-oauth-csharp-client.dll** will be created at ebay-oauth-csharp-client/bin/Debug/net6.0
115
+
# Use the eBay.OAuth.Client in the .NET App
68
116
69
-
== Use the eBay.OAuth.Client in the .NET App
70
-
- Create a config http://yaml.org/[YAML] file in your application. The config file should contain your eBay applications keys:
71
-
App Id, Cert Id & Dev Id. A sample config file is available at https://github.com/ebay/ebay-oauth-csharp-client/blob/master/Tests/ebay-config-sample.yaml[https://github.com/ebay/ebay-oauth-csharp-client/blob/master/Tests/ebay-config-sample.yaml]. Learn more about https://developer.ebay.com/api-docs/static/creating-edp-account.html#Register[creating application keys].
72
-
[source, csharp]
117
+
- Create a config [YAML](http://yaml.org/) file in your application. The
118
+
config file should contain your eBay applications keys: App Id, Cert
- Once the config file is ready, use following code to load it. It is
139
+
recommended to load the credentials during startup time
140
+
(initialization) to prevent runtime delays.
84
141
85
-
- Once the config file is ready, use following code to load it. It is recommended to load the credentials during startup time (initialization) to prevent runtime delays.
86
-
[source,csharp]
142
+
```csharp
87
143
CredentialUtil.Load(“YAMLconfigfilepath”);
88
144
or
89
145
CredentialUtil.Load(System.IO.StreamReader);
146
+
```
90
147
91
148
- Once the credentials are loaded, call any operation on **OAuth2Api**.
92
-
1.**GetApplicationToken**: Use this operation when the application request an access token to access their own resources,
93
-
not on behalf of a user. Learn more about https://developer.ebay.com/api-docs/static/oauth-client-credentials-grant.html[Client Credentials grant flow].
94
-
[source,csharp]
149
+
150
+
1.**GetApplicationToken**: Use this operation when the application
151
+
request an access token to access their own resources, not on
152
+
behalf of a user. Learn more about [Client Credentials grant
4.**GetAccessToken**: Usually access tokens are short lived. Use this operation to update the access token. Learn more about https://developer.ebay.com/api-docs/static/oauth-qref-auth-code-grant.html[Using a refresh token to update the access token].
110
-
[source, csharp]
180
+
1.**GetAccessToken**: Usually access tokens are short lived. Use this
181
+
operation to update the access token. Learn more about [Using a
Contributions in terms of patches, features, or comments are always
192
+
welcome. Refer to [CONTRIBUTING](CONTRIBUTING.adoc) for guidelines.
193
+
Submit Github issues for any feature enhancements, bugs, or
194
+
documentation problems as well as questions and comments.
112
195
113
-
== Contribution
114
-
Contributions in terms of patches, features, or comments are always welcome. Refer to link:CONTRIBUTING.adoc[CONTRIBUTING] for guidelines. Submit Github issues for any feature enhancements, bugs, or documentation problems as well as questions and comments.
196
+
# License
115
197
116
-
== License
117
198
Copyright (c) 2018-2019 eBay Inc.
118
199
119
-
Use of this source code is governed by a Apache 2.0 license that can be found in the LICENSE file or at https://opensource.org/licenses/Apache-2.0.
200
+
Use of this source code is governed by a Apache 2.0 license that can be
0 commit comments