Creates a WS-Federation sign in request message by using the WS-Federation parameters configured on the module.
Assembly: System.IdentityModel.Services (in System.IdentityModel.Services.dll)
public SignInRequestMessage CreateSignInRequest( string uniqueId, string returnUrl, bool rememberMeSet )
- Type: System.String
The WSFAM saves this value in the wctx parameter in the WS-Federation sign in request; however, the module does not use it when processing sign-in requests or sign-in responses. You can set it to any value. It does not have to be unique.
- Type: System.String
The URL to which the module should return upon authentication.
- Type: System.Boolean
The WSFAM saves this value in the wctx parameter in the WS-Federation sign in request; however, the module does not use it when processing sign-in requests or sign-in responses. You can set it either true or false.
Return ValueType: System.IdentityModel.Services.SignInRequestMessage
The WS-Federation sign-in request message.
The Context property (the wctx parameter) is set to a value created by using the method parameters.
The CurrentTime property (the wct parameter) is set to the current time.
All other properties are set by using the equivalent properties of the current instance.
The parameters passed to the method are used to create the wctx message parameter. This is a string with the following format: ru=returnUrl&cx=SignInContext&rm=rememberMeSet&id=uniqueId.
The ru value is set to the value of the returnUrl parameter passed in to the method and it specifies the URL that the module should direct the browser to following successful authentication. This is the only value stored in the wctx string that is used by the WSFAM. The module calls the GetReturnUrlFromResponse method to extract this value from the wctx parameter when processing a WS-Federation sign-in response. It should not be confused with the wreply message parameter, which is specified by the Reply property and which provides the address at the RP to which the security token service (STS) should direct its response.
The cx parameter is set to the value of the SignInContext property. This property is exposed to enable you to set any application-defined context that should be stored in the wctx string; however, WSFAM does not expose a method to extract this value in the response. If the value is needed by your application, you must provide the code to parse the wctx string and read this value when processing the response. You might accomplish this by overriding the GetReturnUrlFromResponse method.
Neither the rm value, which is set to the value of the rememberMeSet parameter, nor the id parameter, which is set to the value of the uniqueId parameter are used by WSFAM. These can be set to any value.
The method is called from the RedirectToIdentityProvider method.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.