Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2642736548 | ||
|
|
6cfab46b9d | ||
|
|
2567036747 | ||
|
|
2e5561befb | ||
|
|
202f215c19 | ||
|
|
28b4edbde9 |
@@ -84,7 +84,7 @@ A big thanks goes out to all these contributors without whom this would not have
|
|||||||
* Ben Foster (https://github.com/benfoster)
|
* Ben Foster (https://github.com/benfoster)
|
||||||
* Jonathan Peterson (https://github.com/eonasdan)
|
* Jonathan Peterson (https://github.com/eonasdan)
|
||||||
|
|
||||||
For most accurate and up to date list of contributors please see https://github.com/RockstarLabs/OwinOAuthProviders/graphs/contributors
|
For most accurate and up to date list of contributors please see https://github.com/TerribleDev/OwinOAuthProviders/graphs/contributors
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ PACKAGES = File.expand_path("packages")
|
|||||||
TOOLS = File.expand_path("tools")
|
TOOLS = File.expand_path("tools")
|
||||||
NUGET = File.expand_path("#{TOOLS}/nuget")
|
NUGET = File.expand_path("#{TOOLS}/nuget")
|
||||||
NUGET_EXE = File.expand_path("#{TOOLS}/nuget/nuget.exe")
|
NUGET_EXE = File.expand_path("#{TOOLS}/nuget/nuget.exe")
|
||||||
@version = "2.9.0"
|
@version = "2.11.0"
|
||||||
PROJECTS = Dir.glob('src/*').select{|dir| File.directory? dir }
|
PROJECTS = Dir.glob('src/*').select{|dir| File.directory? dir }
|
||||||
|
|
||||||
desc 'Retrieve things'
|
desc 'Retrieve things'
|
||||||
|
|||||||
@@ -16,9 +16,7 @@
|
|||||||
There are many individual providers, this package is a meta package that has a dependency on all of them.
|
There are many individual providers, this package is a meta package that has a dependency on all of them.
|
||||||
</summary>
|
</summary>
|
||||||
<releaseNotes>
|
<releaseNotes>
|
||||||
Version 2.3
|
View the release notes on github
|
||||||
- Added Geni, and discord providers.
|
|
||||||
- Retarget to .net 4.5 from 4.5.2
|
|
||||||
</releaseNotes>
|
</releaseNotes>
|
||||||
<copyright>Copyright 2013 - 2016</copyright>
|
<copyright>Copyright 2013 - 2016</copyright>
|
||||||
<tags>owin katana oauth LinkedIn Yahoo Google+ GitHub Reddit Instagram StackExchange SalesForce TripIt Buffer ArcGIS Dropbox Wordpress Battle.NET Yammer OpenID Steam Twitch</tags>
|
<tags>owin katana oauth LinkedIn Yahoo Google+ GitHub Reddit Instagram StackExchange SalesForce TripIt Buffer ArcGIS Dropbox Wordpress Battle.NET Yammer OpenID Steam Twitch</tags>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
Also adds generic OpenID 2.0 providers as well implementations for Steam and Wargaming.
|
Also adds generic OpenID 2.0 providers as well implementations for Steam and Wargaming.
|
||||||
</summary>
|
</summary>
|
||||||
<releaseNotes>
|
<releaseNotes>
|
||||||
- Added Box, and Baidu providers
|
View the release notes on github
|
||||||
</releaseNotes>
|
</releaseNotes>
|
||||||
<copyright>Copyright 2013 - 2016</copyright>
|
<copyright>Copyright 2013 - 2016</copyright>
|
||||||
<tags>owin katana oauth LinkedIn Yahoo Google+ GitHub Reddit Instagram StackExchange SalesForce TripIt Buffer ArcGIS Dropbox Wordpress Battle.NET Yammer OpenID Steam Twitch Box Baidu</tags>
|
<tags>owin katana oauth LinkedIn Yahoo Google+ GitHub Reddit Instagram StackExchange SalesForce TripIt Buffer ArcGIS Dropbox Wordpress Battle.NET Yammer OpenID Steam Twitch Box Baidu</tags>
|
||||||
|
|||||||
@@ -213,7 +213,11 @@ namespace Owin.Security.Providers.LinkedIn
|
|||||||
"&scope=" + Uri.EscapeDataString(scope) +
|
"&scope=" + Uri.EscapeDataString(scope) +
|
||||||
"&state=" + Uri.EscapeDataString(state);
|
"&state=" + Uri.EscapeDataString(state);
|
||||||
|
|
||||||
Response.Redirect(authorizationEndpoint);
|
|
||||||
|
var redirectContext = new LinkedInApplyRedirectContext(
|
||||||
|
Context, Options,
|
||||||
|
properties, authorizationEndpoint);
|
||||||
|
Options.Provider.ApplyRedirect(redirectContext);
|
||||||
|
|
||||||
return Task.FromResult<object>(null);
|
return Task.FromResult<object>(null);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,6 +64,7 @@
|
|||||||
<Compile Include="LinkedInAuthenticationMiddleware.cs" />
|
<Compile Include="LinkedInAuthenticationMiddleware.cs" />
|
||||||
<Compile Include="LinkedInAuthenticationOptions.cs" />
|
<Compile Include="LinkedInAuthenticationOptions.cs" />
|
||||||
<Compile Include="Provider\ILinkedInAuthenticationProvider.cs" />
|
<Compile Include="Provider\ILinkedInAuthenticationProvider.cs" />
|
||||||
|
<Compile Include="Provider\LinkedInApplyRedirectContext.cs" />
|
||||||
<Compile Include="Provider\LinkedInAuthenticatedContext.cs" />
|
<Compile Include="Provider\LinkedInAuthenticatedContext.cs" />
|
||||||
<Compile Include="Provider\LinkedInAuthenticationProvider.cs" />
|
<Compile Include="Provider\LinkedInAuthenticationProvider.cs" />
|
||||||
<Compile Include="Provider\LinkedInReturnEndpointContext.cs" />
|
<Compile Include="Provider\LinkedInReturnEndpointContext.cs" />
|
||||||
|
|||||||
@@ -20,5 +20,11 @@ namespace Owin.Security.Providers.LinkedIn
|
|||||||
/// <param name="context"></param>
|
/// <param name="context"></param>
|
||||||
/// <returns>A <see cref="Task"/> representing the completed operation.</returns>
|
/// <returns>A <see cref="Task"/> representing the completed operation.</returns>
|
||||||
Task ReturnEndpoint(LinkedInReturnEndpointContext context);
|
Task ReturnEndpoint(LinkedInReturnEndpointContext context);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called when a Challenge causes a redirect to authorize endpoint in the LinkedIn middleware
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context">Contains redirect URI and <see cref="AuthenticationProperties"/> of the challenge </param>
|
||||||
|
void ApplyRedirect(LinkedInApplyRedirectContext context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
using Microsoft.Owin;
|
||||||
|
using Microsoft.Owin.Security;
|
||||||
|
using Microsoft.Owin.Security.Provider;
|
||||||
|
|
||||||
|
|
||||||
|
namespace Owin.Security.Providers.LinkedIn
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Context passed when a Challenge causes a redirect to authorize endpoint in the LinkedIn middleware
|
||||||
|
/// </summary>
|
||||||
|
public class LinkedInApplyRedirectContext : BaseContext<LinkedInAuthenticationOptions>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new context object.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context">The OWIN request context</param>
|
||||||
|
/// <param name="options">The LinkedIn middleware options</param>
|
||||||
|
/// <param name="properties">The authenticaiton properties of the challenge</param>
|
||||||
|
/// <param name="redirectUri">The initial redirect URI</param>
|
||||||
|
public LinkedInApplyRedirectContext(IOwinContext context, LinkedInAuthenticationOptions options,
|
||||||
|
AuthenticationProperties properties, string redirectUri)
|
||||||
|
: base(context, options)
|
||||||
|
{
|
||||||
|
RedirectUri = redirectUri;
|
||||||
|
Properties = properties;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the URI used for the redirect operation.
|
||||||
|
/// </summary>
|
||||||
|
public string RedirectUri { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the authentication properties of the challenge
|
||||||
|
/// </summary>
|
||||||
|
public AuthenticationProperties Properties { get; private set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,6 +15,8 @@ namespace Owin.Security.Providers.LinkedIn
|
|||||||
{
|
{
|
||||||
OnAuthenticated = context => Task.FromResult<object>(null);
|
OnAuthenticated = context => Task.FromResult<object>(null);
|
||||||
OnReturnEndpoint = context => Task.FromResult<object>(null);
|
OnReturnEndpoint = context => Task.FromResult<object>(null);
|
||||||
|
OnApplyRedirect = context =>
|
||||||
|
context.Response.Redirect(context.RedirectUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -27,6 +29,11 @@ namespace Owin.Security.Providers.LinkedIn
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public Func<LinkedInReturnEndpointContext, Task> OnReturnEndpoint { get; set; }
|
public Func<LinkedInReturnEndpointContext, Task> OnReturnEndpoint { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the delegate that is invoked when the ApplyRedirect method is invoked.
|
||||||
|
/// </summary>
|
||||||
|
public Action<LinkedInApplyRedirectContext> OnApplyRedirect { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Invoked whenever LinkedIn successfully authenticates a user
|
/// Invoked whenever LinkedIn successfully authenticates a user
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -46,5 +53,14 @@ namespace Owin.Security.Providers.LinkedIn
|
|||||||
{
|
{
|
||||||
return OnReturnEndpoint(context);
|
return OnReturnEndpoint(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called when a Challenge causes a redirect to authorize endpoint in the LinkedIn middleware
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context">Contains redirect URI and <see cref="AuthenticationProperties"/> of the challenge </param>
|
||||||
|
public virtual void ApplyRedirect(LinkedInApplyRedirectContext context)
|
||||||
|
{
|
||||||
|
OnApplyRedirect(context);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -40,6 +40,7 @@ namespace Owin.Security.Providers.Salesforce
|
|||||||
LastName = TryGetValue(user, "last_name");
|
LastName = TryGetValue(user, "last_name");
|
||||||
TimeZone = TryGetValue(user, "timezone");
|
TimeZone = TryGetValue(user, "timezone");
|
||||||
Active = TryGetValue(user, "active");
|
Active = TryGetValue(user, "active");
|
||||||
|
MobilePhone = TryGetValue(user, "mobile_phone");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -121,6 +122,11 @@ namespace Owin.Security.Providers.Salesforce
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string Active { get; private set; }
|
public string Active { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the user's mobile phone number
|
||||||
|
/// </summary>
|
||||||
|
public string MobilePhone { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <see cref="ClaimsIdentity"/> representing the user
|
/// Gets the <see cref="ClaimsIdentity"/> representing the user
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ namespace Owin.Security.Providers.Salesforce
|
|||||||
Caption = Constants.DefaultAuthenticationType;
|
Caption = Constants.DefaultAuthenticationType;
|
||||||
CallbackPath = new PathString("/signin-salesforce");
|
CallbackPath = new PathString("/signin-salesforce");
|
||||||
AuthenticationMode = AuthenticationMode.Passive;
|
AuthenticationMode = AuthenticationMode.Passive;
|
||||||
Scope = new List<string>();
|
Scope = new List<string> { "id" };
|
||||||
BackchannelTimeout = TimeSpan.FromSeconds(60);
|
BackchannelTimeout = TimeSpan.FromSeconds(60);
|
||||||
Endpoints = new SalesforceAuthenticationEndpoints
|
Endpoints = new SalesforceAuthenticationEndpoints
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user