public IPrincipalExtensionsTests()
        {
            this.facebookCredentials = new FacebookCredentials() { UserId = "Facebook:FBUserId", AccessToken = "ABCDEF" };

            HttpConfiguration config = new HttpConfiguration();
            this.tokenHandlerMock = new Mock<AppServiceTokenHandler>(config) { CallBase = true };
            this.tokenHandler = this.tokenHandlerMock.Object;
        }
        public static void SetAppServiceTokenHandler(this HttpConfiguration config, IAppServiceTokenHandler handler)
        {
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            config.Properties[ServiceTokenHandlerKey] = handler;
        }
Example #3
0
        public static void SetAppServiceTokenHandler(this HttpConfiguration config, IAppServiceTokenHandler handler)
        {
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            config.Properties[ServiceTokenHandlerKey] = handler;
        }
        public IPrincipalExtensionsTests()
        {
            this.facebookCredentials = new FacebookCredentials()
            {
                UserId = "Facebook:FBUserId", AccessToken = "ABCDEF"
            };

            HttpConfiguration config = new HttpConfiguration();

            this.tokenHandlerMock = new Mock <AppServiceTokenHandler>(config)
            {
                CallBase = true
            };
            this.tokenHandler = this.tokenHandlerMock.Object;
        }
Example #5
0
 protected override void Initialize(HttpControllerContext controllerContext)
 {
     base.Initialize(controllerContext);
     this.handler = controllerContext.Configuration.GetAppServiceTokenHandler();
 }
 protected override void Initialize(HttpControllerContext controllerContext)
 {
     base.Initialize(controllerContext);
     this.handler = controllerContext.Configuration.GetAppServiceTokenHandler();
 }