Example #1
0
 /// <summary>
 /// Synchronous wrapper for <see cref="MobileConnectInterface.RequestTokenAsync(DiscoveryResponse, Uri, string, string, MobileConnectRequestOptions)"/>
 /// </summary>
 /// <param name="discoveryResponse">The response returned by the discovery process</param>
 /// <param name="redirectedUrl">Uri redirected to by the completion of the authorization UI</param>
 /// <param name="expectedState">The state value returned from the StartAuthorization call should be passed here, it will be used to validate the authenticity of the authorization process</param>
 /// <param name="expectedNonce">The nonce value returned from the StartAuthorization call should be passed here, it will be used to ensure the token was not requested using a replay attack</param>
 /// <param name="options">Optional parameters</param>
 /// <returns>MobileConnectStatus object with required information for continuing the mobileconnect process</returns>
 public MobileConnectStatus RequestToken(
     DiscoveryResponse discoveryResponse,
     Uri redirectedUrl,
     string expectedState,
     string expectedNonce,
     MobileConnectRequestOptions options, string version)
 {
     return(MobileConnectInterfaceHelper.RequestToken(
                _authentication,
                _jwks,
                discoveryResponse,
                redirectedUrl,
                expectedState,
                expectedNonce,
                _config,
                options, version).Result);
 }
 /// <summary>
 /// Request token using the values returned from the authorization redirect
 /// </summary>
 /// <param name="request">Originating web request</param>
 /// <param name="discoveryResponse">The response returned by the discovery process</param>
 /// <param name="redirectedUrl">Uri redirected to by the completion of the authorization UI</param>
 /// <param name="expectedState">The state value returned from the StartAuthorization call should be passed here, it will be used to validate the authenticity of the authorization process</param>
 /// <param name="expectedNonce">The nonce value returned from the StartAuthorization call should be passed here, it will be used to ensure the token was not requested using a replay attack</param>
 /// <param name="options">Optional parameters</param>
 /// <returns>MobileConnectStatus object with required information for continuing the mobileconnect process</returns>
 public async Task <MobileConnectStatus> RequestTokenAsync(
     HttpRequestMessage request,
     DiscoveryResponse discoveryResponse,
     Uri redirectedUrl,
     string expectedState,
     string expectedNonce,
     MobileConnectRequestOptions options, string version)
 {
     return(await MobileConnectInterfaceHelper.RequestToken(
                _authentication,
                _jwks,
                discoveryResponse,
                redirectedUrl,
                expectedState,
                expectedNonce,
                _config,
                options, version));
 }
Example #3
0
 /// <summary>
 /// Request token using the values returned from the authorization redirect
 /// </summary>
 /// <param name="discoveryResponse">The response returned by the discovery process</param>
 /// <param name="redirectedUrl">Uri redirected to by the completion of the authorization UI</param>
 /// <param name="expectedState">The state value returned from the StartAuthorization call should be passed here, it will be used to validate the authenticity of the authorization process</param>
 /// <param name="expectedNonce">The nonce value returned from the StartAuthorization call should be passed here, it will be used to ensure the token was not requested using a replay attack</param>
 /// <returns>MobileConnectStatus object with required information for continuing the mobileconnect process</returns>
 public async Task <MobileConnectStatus> RequestTokenAsync(DiscoveryResponse discoveryResponse, Uri redirectedUrl, string expectedState, string expectedNonce)
 {
     return(await MobileConnectInterfaceHelper.RequestToken(_authentication, discoveryResponse, redirectedUrl, expectedState, expectedNonce, _config));
 }