Ejemplo n.º 1
0
 /// <summary>
 ///     Multi-user Constructor for use with IVimeoClientFactory
 /// </summary>
 /// <param name="authClientFactory">The IAuthorizationClientFactory</param>
 /// <param name="apiRequestFactory">The IApiRequestFactory</param>
 internal VimeoClient(IAuthorizationClientFactory authClientFactory, IApiRequestFactory apiRequestFactory,
     string clientId, string clientSecret)
     : this(clientId, clientSecret)
 {
     _authClientFactory = authClientFactory;
     _apiRequestFactory = apiRequestFactory;
 }
 public AuthorisationFilter(IAuthorizationClientFactory clientFactory, ITokenFactory factory, string appName, string stripPrefix)
 {
     _clientFactory = clientFactory;
     _factory = factory;
     _appName = appName;
     _stripPrefix = stripPrefix;
 }
Ejemplo n.º 3
0
        public static OperationStore Create(string appName, IAuthorizationClientFactory clientFactory, ITokenFactory factory)
        {
            var client = clientFactory.CreateClient();
            var token = factory.GetCurrent();
            var result = client.GetAuthorisedOperations(appName, token);

            return new OperationStore(result);
        }
Ejemplo n.º 4
0
 public static OperationStore Current(string appName, IAuthorizationClientFactory clientFactory, ITokenFactory factory)
 {
     var t = Stored;
     if (t == null)
     {
         t = Create(appName, clientFactory, factory);
         Session[GrantedOperationsSessionKey] = t;
     }
     return t;
 }
Ejemplo n.º 5
0
 /// <summary>
 ///     IOC Constructor for use with IVimeoClientFactory
 /// </summary>
 /// <param name="authClientFactory">The IAuthorizationClientFactory</param>
 /// <param name="apiRequestFactory">The IApiRequestFactory</param>
 public VimeoClientFactory(IAuthorizationClientFactory authClientFactory, IApiRequestFactory apiRequestFactory)
 {
     _authClientFactory = authClientFactory;
     _apiRequestFactory = apiRequestFactory;
 }
Ejemplo n.º 6
0
 public VimeoClientFactory()
 {
     _authClientFactory = new AuthorizationClientFactory();
     _apiRequestFactory = new ApiRequestFactory();
 }
Ejemplo n.º 7
0
 /// <summary>
 ///     Single-user Constructor for use with IVimeoClientFactory
 /// </summary>
 /// <param name="authClientFactory">The IAuthorizationClientFactory</param>
 /// <param name="apiRequestFactory">The IApiRequestFactory</param>
 internal VimeoClient(IAuthorizationClientFactory authClientFactory, IApiRequestFactory apiRequestFactory,
     string accessToken)
     : this(accessToken)
 {
     _authClientFactory = authClientFactory;
     _apiRequestFactory = apiRequestFactory;
 }
Ejemplo n.º 8
0
 protected VimeoClient()
 {
     _authClientFactory = new AuthorizationClientFactory();
     _apiRequestFactory = new ApiRequestFactory();
 }