Add support for the prompt parameter in Salesforce

This commit is contained in:
Spencer Thang
2015-07-29 14:34:03 +01:00
parent 291a70f079
commit 0c279e73f0
2 changed files with 14 additions and 0 deletions

View File

@@ -198,6 +198,11 @@ namespace Owin.Security.Providers.Salesforce
""
);
if (Options.Prompt != null)
{
authorizationEndpoint += string.Format("&prompt={0}", Options.Prompt);
}
Response.Redirect(authorizationEndpoint);
}

View File

@@ -94,6 +94,15 @@ namespace Owin.Security.Providers.Salesforce
/// </summary>
public IList<string> Scope { get; private set; }
/// <summary>
/// Specifies how the authorization server prompts the user for reauthentication and reapproval. This parameter is optional.
/// The only values Salesforce supports are:
/// login—The authorization server must prompt the user for reauthentication, forcing the user to log in again.
/// consent—The authorization server must prompt the user for reapproval before returning information to the client.
/// It is valid to pass both values, separated by a space, to require the user to both log in and reauthorize.
/// </summary>
public string Prompt { get; set; }
/// <summary>
/// Gets or sets the name of another authentication middleware which will be responsible for actually issuing a user
/// <see cref="System.Security.Claims.ClaimsIdentity" />.