Custom AuthenticationProvider is not called

后端 未结 1 1300
时光取名叫无心
时光取名叫无心 2021-01-13 13:23

I want to have a basic auth-protected REST app. I followed the general instructions from http://www.baeldung.com/spring-security-authentication-provider in order to get the

1条回答
  •  逝去的感伤
    2021-01-13 14:03

    You receive a response with status code 401. This is the "unauthorized" http status code. It is probably caused by a missing/malformed Authorization header in your request.

    You are using Http-Basic: it requires the following header in the request :

    Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l
    

    where the string QWxhZGRpbjpPcGVuU2VzYW1l is the string : base64 encoded.

    0 讨论(0)
提交回复
热议问题