When I add the auth features today, I’d like to decorate them for my customers, is this possible?
I tried to dynamically find the Route attribute and then edit its values like this:
var authRoute = typeof(Authenticate)
.GetCustomAttribute<RouteAttribute>();
authRoute.Summary = "Authentication methods";
authRoute.Notes = "This service contains authentication methods using several different providers.";
authRoute.Verbs = "GET";
But that didn’t work, I just got null for authRoute. Then I tried to add an attribute instead:
typeof(Authenticate)
.AddAttributes(new RouteAttribute("/authenticate/logout")
{
Summary = "Log out your current user session",
Notes = "Logs out your current user session and clears cookies",
Verbs = "GET"
});
But instead of decorating, I got two routes and I probably broke the mechanisms as well.
Suggestions?