@using Microsoft.AspNet.Http.Authentication @using Microsoft.AspNet.WebUtilities @using System.Security.Claims @{ AuthenticationManager authentication = Context.Authentication; ClaimsPrincipal principal = authentication.AuthenticateAsync(Constants.ApplicationAuthenticationSheme).Result; string[] scopes = QueryHelpers.ParseQuery(Context.Request.QueryString.Value)["scope"]; }