Ejemplo n.º 1
0
        public void AddScope_should_return_same_distionary_when_permissions_are_none()
        {
            var args = new Dictionary<string, object>();

              var result = args.AddScope(Permissions.None);

              Assert.Equal(args, result);
        }
Ejemplo n.º 2
0
        void RequestAuthorizationCode(string redirectUrl)
        {
            var args = new Dictionary<string, object> {
            { ResponseTypeKey, CodeKey },
            { ClientIdKey, clientId },
            { RedirectUriKey, redirectUrl },
              };

              args.AddScope(Scope).
            AddDisplayType(Display).
            AddAuthorizationType(Type);

              var requestUrl = AuthorizeUrl.ToUri(args);

              httpContext.Response.Redirect(requestUrl.ToString(), true);
        }