|
| 1 | +# IdentityModel |
| 2 | +A helper library for claims-based identity, OAuth 2.0 and OpenID Connect. |
| 3 | + |
| 4 | +## .NET, Portable .NET, WinRT and Windows Phone 8.1 |
| 5 | + |
| 6 | +### TokenClient |
| 7 | +Client library for OAuth 2.0 and OpenID Connect token endpoints. |
| 8 | + |
| 9 | +Features: |
| 10 | + |
| 11 | +* Support for client credentials & resource owner password credential flow |
| 12 | +* Support for exchanging authorization codes with tokens |
| 13 | +* Support for refreshing refresh tokens |
| 14 | +* Support for client credentials via Basic Authentication, POST body and X.509 client certificates |
| 15 | +* Extensible for custom parameters |
| 16 | +* Parsing of token response messages |
| 17 | + |
| 18 | +Example: |
| 19 | +```csharp |
| 20 | +var client = new TokenClient( |
| 21 | + "https://server/token", |
| 22 | + "client_id", |
| 23 | + "secret"); |
| 24 | + |
| 25 | +var response = await client.RequestClientCredentialsAsync("scope"); |
| 26 | +var token = response.AccessToken; |
| 27 | +``` |
| 28 | + |
| 29 | + |
| 30 | +### AuthorizeRequest |
| 31 | +Helper class for creating authorize request URLs (e.g. for code and implicit flow). |
| 32 | + |
| 33 | +### UserInfoClient |
| 34 | +Client library for an OpenID Connect user info endpoint |
| 35 | + |
| 36 | +### Base64 URL encoder/decoder |
| 37 | +Helper for working with URL safe base64 encodings |
| 38 | + |
| 39 | +### Epoch Time Extensions |
| 40 | +Helper for converting `DateTime` and `DateTimeOffset` to/from Epoch Time |
| 41 | + |
| 42 | +### Time Constant Comparer |
| 43 | +Helper for comparing strings without leaking timing information |
| 44 | + |
| 45 | +### JWT/OpenID Connect Claim Types |
| 46 | +Constants for standard claim types used in JWT, OAuth 2.0 and OpenID Connect |
| 47 | + |
| 48 | +## Full .NET Framework only |
| 49 | + |
| 50 | +### Extensions |
| 51 | + |
| 52 | +**XML Extensions** |
| 53 | +Helpers for converting between `XmlDocument`, `XDocument`, `XmlElement` and `XElement` and working with `XmlReader` |
| 54 | + |
| 55 | +**Security Token Extensions** |
| 56 | +Helpers for converting between `SecurityToken`, `GenericXmlSecurityToken`, `ClaimsPrincipal` and strings |
| 57 | + |
| 58 | +**Fluent API to access the X.509 Certificate store** |
| 59 | +e.g. do |
| 60 | +`var cert = X509.LocalMachine.My.SubjectDistinguishedName.Find("CN=sts").First();` |
| 61 | + |
| 62 | +**System.IdentityModel Helpers** |
| 63 | +Generic UserName security token helper, simple security token, HMAC signing credentials |
0 commit comments