protected void Page_Load(Object sender, EventArgs e)
        {
            message = Request.QueryString.ReadAuthorizationRequest();

            client.InnerText = message.ClientId;
            callback.InnerText = message.Callback;
        }
Esempio n. 2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="names"></param>
        /// <returns></returns>
        public static AuthorizationRequest ReadAuthorizationRequest(this NameValueCollection names)
        {
            if (null == names)
                throw new ArgumentNullException("names");

            var message = new AuthorizationRequest();

            foreach (String key in names.Keys)
            {
                String value = names[key];
                if (false == key.StartsWith("wrap_", StringComparison.OrdinalIgnoreCase) || String.IsNullOrEmpty(value))
                    continue;
                message.SetParameter(key, value);
            }
            message.Validate();

            return message;
        }
Esempio n. 3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="response"></param>
 /// <param name="baseUri"></param>
 /// <param name="message"></param>
 public static void WriteRequest(this HttpResponse response, String baseUri, AuthorizationRequest message)
 {
     response.Redirect(baseUri + "?" + message.ToString());
 }