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