This commit is contained in:
@ -3,6 +3,7 @@ using System.Security.Claims;
|
||||
using Microsoft.AspNet.Authentication;
|
||||
using Microsoft.AspNet.Authentication.Cookies;
|
||||
using Microsoft.AspNet.Authentication.Facebook;
|
||||
using Microsoft.AspNet.Authentication.Twitter;
|
||||
using Microsoft.AspNet.Authentication.JwtBearer;
|
||||
using Microsoft.AspNet.Authentication.OAuth;
|
||||
using Microsoft.AspNet.Builder;
|
||||
@ -17,6 +18,7 @@ using OAuth.AspNet.Tokens;
|
||||
using Yavsc.Auth;
|
||||
using Yavsc.Extensions;
|
||||
using Yavsc.Models;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Yavsc
|
||||
{
|
||||
@ -26,6 +28,8 @@ namespace Yavsc
|
||||
|
||||
public static IdentityOptions IdentityAppOptions { get; set; }
|
||||
public static FacebookOptions FacebookAppOptions { get; private set; }
|
||||
|
||||
public static TwitterOptions TwitterAppOptions { get; private set; }
|
||||
public static OAuthAuthorizationServerOptions OAuthServerAppOptions { get; private set; }
|
||||
|
||||
|
||||
@ -156,6 +160,14 @@ namespace Yavsc
|
||||
options.UserInformationEndpoint = "https://graph.facebook.com/v2.5/me?fields=id,name,email,first_name,last_name";
|
||||
});
|
||||
|
||||
branch.UseTwitterAuthentication(options=>
|
||||
{
|
||||
TwitterAppOptions = options;
|
||||
options.ConsumerKey = Configuration["Authentication:Twitter:ClientId"];
|
||||
options.ConsumerSecret = Configuration["Authentication:Twitter:ClientSecret"];
|
||||
});
|
||||
|
||||
|
||||
branch.UseOAuthAuthorizationServer(
|
||||
|
||||
options =>
|
||||
|
@ -49,7 +49,15 @@
|
||||
"Google": {
|
||||
"ApiKey": "[Your ApiKey]",
|
||||
"ClientId" : "[Your ClientId]",
|
||||
"ClientSecret": "[Your ClientSecret"
|
||||
"ClientSecret": "[Your ClientSecret]"
|
||||
},
|
||||
"Facebook": {
|
||||
"ClientId":"[Your ClientId]",
|
||||
"ClientSecret":"[Your ClientSecret]"
|
||||
},
|
||||
"Twitter": {
|
||||
"ClientId":"[Your ClientId]",
|
||||
"ClientSecret":"[Your ClientSecret]"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,8 +18,7 @@
|
||||
"resource": [
|
||||
"Resources/**/*.resx"
|
||||
],
|
||||
"namedResource": {
|
||||
},
|
||||
"namedResource": {},
|
||||
"configurations": {
|
||||
"Debug": {
|
||||
"compilationOptions": {
|
||||
@ -108,7 +107,8 @@
|
||||
"Microsoft.AspNet.Mvc.Formatters.Json": "6.0.0-rc1-final",
|
||||
"Microsoft.AspNet.OWin": "1.0.0-rc1-final",
|
||||
"System.Json": "4.0.20126.16343",
|
||||
"YavscLib": "1.0.0-*"
|
||||
"YavscLib": "1.0.0-*",
|
||||
"Extensions.AspNet.Authentication.Instagram": "1.0.0-t150809211713"
|
||||
},
|
||||
"commands": {
|
||||
"web": "Microsoft.AspNet.Server.Kestrel --server.urls http://*:5000",
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user