Open stackedbitz opened 5 years ago
Furthermore, would you be open to a PR having IdentityServerAuthProvider implement IAuthWithRequest with:
public void PreAuthenticate(IRequest req, IResponse res)
{
var bearerToken = req.GetBearerToken();
var authService = req.TryResolve<AuthenticateService>();
authService.Request = req;
Authenticate(authService, req.GetSession(), new Authenticate
{
provider = Name,
oauth_token = bearerToken
});
}
It's convenient to have pre-authentication occur at the same time a secured request is made, especially when using a client like Postman, else one has to a call to /auth/IdentityServer before making another to the desired service call.
Is there any reason why you chose not to add IAuthWithRequest, which requires the implementation of
PreAuthenticate(req, res)
, as an interface for IdentityServerAuthProvider?