using Microsoft.AspNet.Authentication.OAuth;
using Microsoft.AspNet.Http;
namespace Yavsc.Auth
{
public static class GoogleDefaults
{
public const string AuthenticationScheme = "Google";
public static readonly string AuthorizationEndpoint = "https://accounts.google.com/o/oauth2/auth";
public static readonly string TokenEndpoint = "https://www.googleapis.com/oauth2/v3/token";
public static readonly string UserInformationEndpoint = "https://www.googleapis.com/plus/v1/people/me";
}
///
/// Configuration options for .
///
public class GoogleOptions : OAuthOptions
{
///
/// Initializes a new .
///
public GoogleOptions()
{
AuthenticationScheme = GoogleDefaults.AuthenticationScheme;
DisplayName = AuthenticationScheme;
CallbackPath = new PathString("/signin-google");
AuthorizationEndpoint = GoogleDefaults.AuthorizationEndpoint;
TokenEndpoint = GoogleDefaults.TokenEndpoint;
UserInformationEndpoint = GoogleDefaults.UserInformationEndpoint;
Scope.Add("openid");
Scope.Add("profile");
Scope.Add("email");
}
///
/// access_type. Set to 'offline' to request a refresh token.
///
public string AccessType { get; set; }
}
}