Beispiel #1
0
 public static TwitterOptions Twitter(AuthenticationSchemeData data)
 {
     return(new TwitterOptions
     {
         ConsumerKey = data.ClientSecret,
         ConsumerSecret = data.ClientSecret
     });
 }
Beispiel #2
0
        public static TOptions OAuth <TOptions>(AuthenticationSchemeData data) where TOptions : OAuthOptions, new()
        {
            var result = new TOptions
            {
                ClientId     = data.ClientId,
                ClientSecret = data.ClientSecret
            };

            if (data.Scopes != null)
            {
                foreach (var scope in data.Scopes)
                {
                    result.Scope.Add(scope);
                }
            }

            return(result);
        }