/// <summary>
        /// Generates the authentication requests that can satisfy the requirements of some OpenID Identifier.
        /// </summary>
        /// <param name="userSuppliedIdentifier">
        /// The Identifier supplied by the user.  This may be a URL, an XRI or i-name.
        /// </param>
        /// <param name="realm">
        /// The shorest URL that describes this relying party web site's address.
        /// For example, if your login page is found at https://www.example.com/login.aspx,
        /// your realm would typically be https://www.example.com/.
        /// </param>
        /// <param name="returnToUrl">
        /// The URL of the login page, or the page prepared to receive authentication
        /// responses from the OpenID Provider.
        /// </param>
        /// <returns>
        /// An authentication request object that describes the HTTP response to
        /// send to the user agent to initiate the authentication.
        /// </returns>
        /// <remarks>
        /// <para>Any individual generated request can satisfy the authentication.
        /// The generated requests are sorted in preferred order.
        /// Each request is generated as it is enumerated to.  Associations are created only as
        /// <see cref="IAuthenticationRequest.RedirectingResponse"/> is called.</para>
        /// <para>No exception is thrown if no OpenID endpoints were discovered.
        /// An empty enumerable is returned instead.</para>
        /// </remarks>
        internal IEnumerable <IAuthenticationRequest> CreateRequests(Identifier userSuppliedIdentifier, Realm realm, Uri returnToUrl)
        {
            ErrorUtilities.VerifyArgumentNotNull(realm, "realm");
            ErrorUtilities.VerifyArgumentNotNull(returnToUrl, "returnToUrl");

            return(AuthenticationRequest.Create(userSuppliedIdentifier, this, realm, returnToUrl, true).Cast <IAuthenticationRequest>());
        }
예제 #2
0
        /// <summary>
        /// Generates the authentication requests that can satisfy the requirements of some OpenID Identifier.
        /// </summary>
        /// <param name="userSuppliedIdentifier">
        /// The Identifier supplied by the user.  This may be a URL, an XRI or i-name.
        /// </param>
        /// <param name="realm">
        /// The shorest URL that describes this relying party web site's address.
        /// For example, if your login page is found at https://www.example.com/login.aspx,
        /// your realm would typically be https://www.example.com/.
        /// </param>
        /// <param name="returnToUrl">
        /// The URL of the login page, or the page prepared to receive authentication
        /// responses from the OpenID Provider.
        /// </param>
        /// <returns>
        /// A sequence of authentication requests, any of which constitutes a valid identity assertion on the Claimed Identifier.
        /// Never null, but may be empty.
        /// </returns>
        /// <remarks>
        /// <para>Any individual generated request can satisfy the authentication.
        /// The generated requests are sorted in preferred order.
        /// Each request is generated as it is enumerated to.  Associations are created only as
        /// <see cref="IAuthenticationRequest.RedirectingResponse"/> is called.</para>
        /// <para>No exception is thrown if no OpenID endpoints were discovered.
        /// An empty enumerable is returned instead.</para>
        /// </remarks>
        public virtual IEnumerable <IAuthenticationRequest> CreateRequests(Identifier userSuppliedIdentifier, Realm realm, Uri returnToUrl)
        {
            Requires.NotNull(userSuppliedIdentifier, "userSuppliedIdentifier");
            Requires.NotNull(realm, "realm");
            Requires.NotNull(returnToUrl, "returnToUrl");

            return(AuthenticationRequest.Create(userSuppliedIdentifier, this, realm, returnToUrl, true).Cast <IAuthenticationRequest>().CacheGeneratedResults());
        }
예제 #3
0
        /// <summary>
        /// Generates the authentication requests that can satisfy the requirements of some OpenID Identifier.
        /// </summary>
        /// <param name="userSuppliedIdentifier">
        /// The Identifier supplied by the user.  This may be a URL, an XRI or i-name.
        /// </param>
        /// <param name="realm">
        /// The shorest URL that describes this relying party web site's address.
        /// For example, if your login page is found at https://www.example.com/login.aspx,
        /// your realm would typically be https://www.example.com/.
        /// </param>
        /// <param name="returnToUrl">
        /// The URL of the login page, or the page prepared to receive authentication
        /// responses from the OpenID Provider.
        /// </param>
        /// <returns>
        /// A sequence of authentication requests, any of which constitutes a valid identity assertion on the Claimed Identifier.
        /// Never null, but may be empty.
        /// </returns>
        /// <remarks>
        /// <para>Any individual generated request can satisfy the authentication.
        /// The generated requests are sorted in preferred order.
        /// Each request is generated as it is enumerated to.  Associations are created only as
        /// <see cref="IAuthenticationRequest.RedirectingResponse"/> is called.</para>
        /// <para>No exception is thrown if no OpenID endpoints were discovered.
        /// An empty enumerable is returned instead.</para>
        /// </remarks>
        public virtual IEnumerable <IAuthenticationRequest> CreateRequests(Identifier userSuppliedIdentifier, Realm realm, Uri returnToUrl)
        {
            Contract.Requires <ArgumentNullException>(userSuppliedIdentifier != null);
            Contract.Requires <ArgumentNullException>(realm != null);
            Contract.Requires <ArgumentNullException>(returnToUrl != null);
            Contract.Ensures(Contract.Result <IEnumerable <IAuthenticationRequest> >() != null);

            return(AuthenticationRequest.Create(userSuppliedIdentifier, this, realm, returnToUrl, true).Cast <IAuthenticationRequest>().CacheGeneratedResults());
        }