Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39ed336c4d | ||
|
|
6850514ca4 | ||
|
|
17ae5efa21 | ||
|
|
b86f2b65d3 | ||
|
|
c6586f2809 | ||
|
|
bc06288ea2 | ||
|
|
02fa70bbe3 | ||
|
|
d5d7c19a30 | ||
|
|
05cd9a4fab | ||
|
|
b4447fa319 | ||
|
|
c9dd2cc062 | ||
|
|
b64e7e5d3a | ||
|
|
b34579f54c | ||
|
|
22c830dbfb | ||
|
|
06457050a8 | ||
|
|
35ea1c9d79 |
@@ -1,6 +1,6 @@
|
||||
[](https://ci.appveyor.com/project/tparnell8/owinoauthproviders)
|
||||
|
||||
#OWIN OAuth Providers
|
||||
# OWIN OAuth Providers
|
||||
|
||||
Provides a set of extra authentication providers for OWIN ([Project Katana](http://katanaproject.codeplex.com/)). This project includes providers for:
|
||||
- OAuth
|
||||
|
||||
@@ -15,7 +15,7 @@ PACKAGES = File.expand_path("packages")
|
||||
TOOLS = File.expand_path("tools")
|
||||
NUGET = File.expand_path("#{TOOLS}/nuget")
|
||||
NUGET_EXE = File.expand_path("#{TOOLS}/nuget/nuget.exe")
|
||||
@version = "2.22.0"
|
||||
@version = "2.25.0"
|
||||
PROJECTS = Dir.glob('src/*').select{|dir| File.directory? dir }
|
||||
|
||||
desc 'Retrieve things'
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Owin.Security.Providers.Discord.Provider
|
||||
Discriminator = TryGetValue(user, "discriminator");
|
||||
Avatar = TryGetValue(user, "avatar");
|
||||
Email = TryGetValue(user, "email");
|
||||
Verified = TryGetValue(user, "verified") == "true";
|
||||
Verified = TryGetValue(user, "verified").ToLowerInvariant() == "true";
|
||||
}
|
||||
|
||||
public string RefreshToken { get; set; }
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace Owin.Security.Providers.Salesforce
|
||||
var authorizationEndpoint = ComposeAuthorizationEndpoint(properties);
|
||||
|
||||
authorizationEndpoint =
|
||||
$"{authorizationEndpoint}?response_type={"code"}&client_id={Options.ClientId}&redirect_uri={HttpUtility.UrlEncode(redirectUri)}&display={"page"}&immediate={false}&state={Uri.EscapeDataString(state)}";
|
||||
$"{authorizationEndpoint}?response_type={"code"}&client_id={Options.ClientId}&redirect_uri={HttpUtility.UrlEncode(redirectUri)}&display={Options.DisplayMode}&immediate={false}&state={Uri.EscapeDataString(state)}";
|
||||
|
||||
if (Options.Scope != null && Options.Scope.Count > 0)
|
||||
{
|
||||
|
||||
@@ -26,6 +26,21 @@ namespace Owin.Security.Providers.Salesforce
|
||||
public string Environment { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Options for Display Mode
|
||||
/// Changes the login and authorization pages’ display type. Salesforce supports these values.
|
||||
/// page—Full-page authorization screen(default)
|
||||
/// popup—Compact dialog optimized for modern web browser popup windows
|
||||
/// touch—Mobile-optimized dialog designed for modern smartphones, such as Android and iPhone
|
||||
/// mobile—Mobile-optimized dialog designed for less capable smartphones, such as BlackBerry OS 5
|
||||
/// </summary>
|
||||
public enum Display{
|
||||
page,
|
||||
popup,
|
||||
touch,
|
||||
mobile
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the a pinned certificate validator to use to validate the endpoints used
|
||||
/// in back channel communications belong to Salesforce.
|
||||
@@ -110,6 +125,10 @@ namespace Owin.Security.Providers.Salesforce
|
||||
/// <see cref="System.Security.Claims.ClaimsIdentity" />.
|
||||
/// </summary>
|
||||
public string SignInAsAuthenticationType { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the display—(Optional)
|
||||
/// </summary>
|
||||
public Display DisplayMode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type used to secure data handled by the middleware.
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Owin.Security.Providers.Steam
|
||||
{
|
||||
internal sealed class SteamAuthenticationHandler : OpenIDAuthenticationHandlerBase<SteamAuthenticationOptions>
|
||||
{
|
||||
private readonly Regex _accountIDRegex = new Regex(@"^http://steamcommunity\.com/openid/id/(7[0-9]{15,25})$", RegexOptions.Compiled);
|
||||
private readonly Regex _accountIDRegex = new Regex(@"^https?://steamcommunity\.com/openid/id/(7[0-9]{15,25})$", RegexOptions.Compiled);
|
||||
|
||||
private const string UserInfoUri = "http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key={0}&steamids={1}";
|
||||
|
||||
|
||||
@@ -60,8 +60,7 @@ namespace Owin.Security.Providers.Twitch
|
||||
return new AuthenticationTicket(null, properties);
|
||||
}
|
||||
|
||||
var requestPrefix = Request.Scheme + "://" + Request.Host;
|
||||
var redirectUri = requestPrefix + Request.PathBase + Options.CallbackPath;
|
||||
var redirectUri = GetRequestPrefix() + Request.PathBase + Options.CallbackPath;
|
||||
|
||||
// Build up the body for the token request
|
||||
var body = new List<KeyValuePair<string, string>>
|
||||
@@ -146,9 +145,7 @@ namespace Owin.Security.Providers.Twitch
|
||||
|
||||
if (challenge == null) return Task.FromResult<object>(null);
|
||||
var baseUri =
|
||||
Request.Scheme +
|
||||
Uri.SchemeDelimiter +
|
||||
Request.Host +
|
||||
GetRequestPrefix() +
|
||||
Request.PathBase;
|
||||
|
||||
var currentUri =
|
||||
@@ -237,5 +234,12 @@ namespace Owin.Security.Providers.Twitch
|
||||
|
||||
return context.IsRequestCompleted;
|
||||
}
|
||||
|
||||
private string GetRequestPrefix()
|
||||
{
|
||||
return !String.IsNullOrEmpty(Options.RequestPrefix)
|
||||
? Options.RequestPrefix
|
||||
: Request.Scheme + Uri.SchemeDelimiter + Request.Host;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -125,6 +125,11 @@ namespace Owin.Security.Providers.Twitch
|
||||
/// </summary>
|
||||
public bool ForceVerify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Request prefix
|
||||
/// </summary>
|
||||
public string RequestPrefix { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new <see cref="TwitchAuthenticationOptions" />
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user