The UseOAuthBearerTokens
extension method creates both the token server and the middleware to validate tokens for requests in the same application.
Pseudocode from source using reflector:
UseOAuthAuthorizationServer(); // authorization server middleware
UseOAuthBearerAuthentication(ApplicationOAuthBearerProvider); // application bearer token middleware
UseOAuthBearerAuthentication(ExternalOAuthBearerProvider); // external bearer token middleware