diff --git a/Owin.Security.Providers/Owin.Security.Providers.csproj b/Owin.Security.Providers/Owin.Security.Providers.csproj
index f91a14e..655c7e5 100644
--- a/Owin.Security.Providers/Owin.Security.Providers.csproj
+++ b/Owin.Security.Providers/Owin.Security.Providers.csproj
@@ -90,6 +90,15 @@
True
Resources.resx
+
+
+
+
+
+
+
+
+
diff --git a/Owin.Security.Providers/Reddit/Constants.cs b/Owin.Security.Providers/Reddit/Constants.cs
new file mode 100644
index 0000000..296c178
--- /dev/null
+++ b/Owin.Security.Providers/Reddit/Constants.cs
@@ -0,0 +1,7 @@
+namespace Owin.Security.Providers.Reddit
+{
+ internal static class Constants
+ {
+ public const string DefaultAuthenticationType = "Reddit";
+ }
+}
\ No newline at end of file
diff --git a/Owin.Security.Providers/Reddit/Provider/IRedditAuthenticationProvider.cs b/Owin.Security.Providers/Reddit/Provider/IRedditAuthenticationProvider.cs
new file mode 100644
index 0000000..ae79a09
--- /dev/null
+++ b/Owin.Security.Providers/Reddit/Provider/IRedditAuthenticationProvider.cs
@@ -0,0 +1,24 @@
+using System.Threading.Tasks;
+
+namespace Owin.Security.Providers.Reddit.Provider
+{
+ ///
+ /// Specifies callback methods which the invokes to enable developer control over the authentication process. />
+ ///
+ public interface IRedditAuthenticationProvider
+ {
+ ///
+ /// Invoked whenever Reddit succesfully authenticates a user
+ ///
+ /// Contains information about the login session as well as the user .
+ /// A representing the completed operation.
+ Task Authenticated(RedditAuthenticatedContext context);
+
+ ///
+ /// Invoked prior to the being saved in a local cookie and the browser being redirected to the originally requested URL.
+ ///
+ ///
+ /// A representing the completed operation.
+ Task ReturnEndpoint(RedditReturnEndpointContext context);
+ }
+}
\ No newline at end of file
diff --git a/Owin.Security.Providers/Reddit/Provider/RedditAuthenticatedContext.cs b/Owin.Security.Providers/Reddit/Provider/RedditAuthenticatedContext.cs
new file mode 100644
index 0000000..2e0c564
--- /dev/null
+++ b/Owin.Security.Providers/Reddit/Provider/RedditAuthenticatedContext.cs
@@ -0,0 +1,107 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+using System;
+using System.Globalization;
+using System.Security.Claims;
+using Microsoft.Owin;
+using Microsoft.Owin.Security;
+using Microsoft.Owin.Security.Provider;
+using Newtonsoft.Json.Linq;
+
+namespace Owin.Security.Providers.Reddit.Provider
+{
+ ///
+ /// Contains information about the login session as well as the user .
+ ///
+ public class RedditAuthenticatedContext : BaseContext
+ {
+ ///
+ /// Initializes a
+ ///
+ /// The OWIN environment
+ /// The JSON-serialized user
+ /// Reddit Access token
+ /// Seconds until expiration
+ public RedditAuthenticatedContext(IOwinContext context, JObject user, string accessToken, string expires, string refreshToken)
+ : base(context)
+ {
+ User = user;
+ AccessToken = accessToken;
+ RefreshToken = refreshToken;
+ int expiresValue;
+ if (Int32.TryParse(expires, NumberStyles.Integer, CultureInfo.InvariantCulture, out expiresValue))
+ {
+ ExpiresIn = TimeSpan.FromSeconds(expiresValue);
+ }
+
+ /*{
+ "has_mail": false,
+ "name": "************",
+ "created": 1313605620.0,
+ "created_utc": 1313602020.0,
+ "link_karma": 344,
+ "comment_karma": 1782,
+ "over_18": true,
+ "is_gold": false,
+ "is_mod": true,
+ "has_verified_email": true,
+ "id": "5omjg",
+ "has_mod_mail": false
+ }*/
+ Id = TryGetValue(user, "id");
+ UserName = TryGetValue(user, "name");
+ OverEighteen = bool.Parse(TryGetValue(user, "over_18"));
+
+ }
+
+ public bool OverEighteen { get; set; }
+
+ public string RefreshToken { get; set; }
+
+ ///
+ /// Gets the JSON-serialized user
+ ///
+ ///
+ /// Contains the Reddit user
+ ///
+ public JObject User { get; private set; }
+
+ ///
+ /// Gets the Reddit access token
+ ///
+ public string AccessToken { get; private set; }
+
+ ///
+ /// Gets the Reddit access token expiration time
+ ///
+ public TimeSpan? ExpiresIn { get; set; }
+
+ ///
+ /// Gets the Reddit user ID
+ ///
+ public string Id { get; private set; }
+
+ public string Link { get; private set; }
+
+ ///
+ /// Gets the Reddit username
+ ///
+ public string UserName { get; private set; }
+
+ ///
+ /// Gets the representing the user
+ ///
+ public ClaimsIdentity Identity { get; set; }
+
+ ///
+ /// Gets or sets a property bag for common authentication properties
+ ///
+ public AuthenticationProperties Properties { get; set; }
+
+ private static string TryGetValue(JObject user, string propertyName)
+ {
+ JToken value;
+ return user.TryGetValue(propertyName, out value) ? value.ToString() : null;
+ }
+ }
+}
diff --git a/Owin.Security.Providers/Reddit/Provider/RedditAuthenticationProvider.cs b/Owin.Security.Providers/Reddit/Provider/RedditAuthenticationProvider.cs
new file mode 100644
index 0000000..39f87c4
--- /dev/null
+++ b/Owin.Security.Providers/Reddit/Provider/RedditAuthenticationProvider.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Threading.Tasks;
+
+namespace Owin.Security.Providers.Reddit.Provider
+{
+ ///
+ /// Default implementation.
+ ///
+ public class RedditAuthenticationProvider : IRedditAuthenticationProvider
+ {
+ ///
+ /// Initializes a
+ ///
+ public RedditAuthenticationProvider()
+ {
+ OnAuthenticated = context => Task.FromResult