Merge branch 'YuriPetskus-patch-1'
This commit is contained in:
@@ -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.11.0"
|
@version = "2.11.1"
|
||||||
PROJECTS = Dir.glob('src/*').select{|dir| File.directory? dir }
|
PROJECTS = Dir.glob('src/*').select{|dir| File.directory? dir }
|
||||||
|
|
||||||
desc 'Retrieve things'
|
desc 'Retrieve things'
|
||||||
|
|||||||
@@ -95,6 +95,12 @@ namespace Owin.Security.Providers.VKontakte
|
|||||||
var user = await GetUser(response, accessToken);
|
var user = await GetUser(response, accessToken);
|
||||||
|
|
||||||
var context = CreateAuthenticatedContext(user, accessToken, properties);
|
var context = CreateAuthenticatedContext(user, accessToken, properties);
|
||||||
|
var email = response["email"]?.ToString();
|
||||||
|
if(!string.IsNullOrWhiteSpace(email))
|
||||||
|
{
|
||||||
|
// Email support. VK send it with access_token
|
||||||
|
context.Identity.AddClaim(new Claim(ClaimTypes.Email, email, XmlSchemaString, Options.AuthenticationType));
|
||||||
|
}
|
||||||
|
|
||||||
await Options.Provider.Authenticated(context);
|
await Options.Provider.Authenticated(context);
|
||||||
|
|
||||||
@@ -226,4 +232,4 @@ namespace Owin.Security.Providers.VKontakte
|
|||||||
return context.IsRequestCompleted;
|
return context.IsRequestCompleted;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user