如果您查看Katana中的Facebook授权选项,您会看到它声明了所有三个网址,即授权端点,访问令牌端点,以及资源服务器端点。
public FacebookAuthenticationOptions() : base("Facebook")
{
this.Caption = "Facebook";
this.CallbackPath = new PathString("/signin-facebook");
base.AuthenticationMode = AuthenticationMode.Passive;
this.Scope = new List<string>();
this.BackchannelTimeout = TimeSpan.FromSeconds(60.0);
this.SendAppSecretProof = true;
this.AuthorizationEndpoint = "https://www.facebook.com/dialog/oauth";
this.TokenEndpoint = "https://graph.facebook.com/oauth/access_token";
this.UserInformationEndpoint = "https://graph.facebook.com/me";
}
然而,虽然我可以在OAana的Katana Linked In实现中找到访问令牌端点和用户信息端点 for Linked In,但我找不到< em>授权网址,即用户点击以查看OAuth2对话框的第一个网址。
public class LinkedInAuthenticationHandler : AuthenticationHandler<LinkedInAuthenticationOptions>
{
private const string XmlSchemaString = "http://www.w3.org/2001/XMLSchema#string";
private const string TokenEndpoint = "https://www.linkedin.com/uas/oauth2/accessToken";
private const string UserInfoEndpoint = "https://api.linkedin.com/v1/people/~:(id,first-name,last-name,formatted-name,email-address,public-profile-url,picture-url)";
它也不在这里。
public LinkedInAuthenticationOptions() : base("LinkedIn")
{
this.Caption = "LinkedIn";
this.CallbackPath = new PathString("/signin-linkedin");
base.AuthenticationMode = AuthenticationMode.Passive;
List<string> list = new List<string>();
list.Add("r_basicprofile");
list.Add("r_emailaddress");
this.Scope = list;
this.BackchannelTimeout = TimeSpan.FromSeconds(60.0);
}