I am currently working with a shell for OAuth2 authentication code, which requires the following function to be called when the application starts:
public static void RegisterServer(IAppBuilder app, OAuthServerProvider provider)
{
app.UseOAuthAuthorizationServer(new OAuthAuthorizationServerOptions
{
AllowInsecureHttp = true,
TokenEndpointPath = new PathString("/token"),
AccessTokenExpireTimeSpan = TimeSpan.FromHours(8),
Provider = provider
});
app.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions());
}
What would be the appropriate method for the unit test of this function to ensure that the marker endpoint is correctly registered? Alternatively, is this something that should be limited to functional testing on a larger scale?
rjzii source
share