Ensure scope has no duplicates
This commit is contained in:
parent
e737f3207e
commit
e00453af4d
|
|
@ -56,9 +56,9 @@ namespace Microsoft.AspNetCore.Builder
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// A list of permissions to request.
|
||||
/// Gets the list of permissions to request.
|
||||
/// </summary>
|
||||
public IList<string> Scope { get; } = new List<string>();
|
||||
public ICollection<string> Scope { get; } = new HashSet<string>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type used to secure data handled by the middleware.
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ namespace Microsoft.AspNetCore.Builder
|
|||
DisplayName = OpenIdConnectDefaults.Caption;
|
||||
CallbackPath = new PathString("/signin-oidc");
|
||||
Events = new OpenIdConnectEvents();
|
||||
Scope.Add("openid");
|
||||
Scope.Add("profile");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -155,7 +157,7 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// <summary>
|
||||
/// Gets the list of permissions to request.
|
||||
/// </summary>
|
||||
public IList<string> Scope { get; } = new List<string> { "openid", "profile" };
|
||||
public ICollection<string> Scope { get; } = new HashSet<string>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type used to secure data handled by the middleware.
|
||||
|
|
|
|||
Loading…
Reference in New Issue