fixes multi scope access
This commit is contained in:
parent
ad29880162
commit
bdc52bc0f6
1 changed files with 4 additions and 3 deletions
|
|
@ -138,14 +138,15 @@ namespace Yavsc.Controllers
|
||||||
queryStringComponents = QueryHelpers.ParseQuery(Request.QueryString.Value);
|
queryStringComponents = QueryHelpers.ParseQuery(Request.QueryString.Value);
|
||||||
|
|
||||||
if (queryStringComponents.ContainsKey("scope"))
|
if (queryStringComponents.ContainsKey("scope"))
|
||||||
scopes = queryStringComponents["scope"];
|
scopes = ((string)queryStringComponents["scope"]).Split(' ');
|
||||||
if (queryStringComponents.ContainsKey("redirect_uri"))
|
if (queryStringComponents.ContainsKey("redirect_uri"))
|
||||||
redirect_uri = queryStringComponents["redirect_uri"];
|
redirect_uri = queryStringComponents["redirect_uri"];
|
||||||
}
|
}
|
||||||
|
var username = User.GetUserName();
|
||||||
|
|
||||||
var model = new AuthorisationView {
|
var model = new AuthorisationView {
|
||||||
Scopes = Constants.SiteScopes.Where(s=> scopes.Contains(s.Id)).ToArray(),
|
Scopes = (Constants.SiteScopes.Where(s=> scopes.Contains(s.Id))).ToArray(),
|
||||||
Message = "Bienvenue."
|
Message = $"Bienvenue {username}."
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
if (Request.Method == "POST")
|
if (Request.Method == "POST")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue