How to login to a spring security login form using cURL?

后端 未结 6 1812
谎友^
谎友^ 2020-12-14 08:14

I am working on a springMVC project in which the user authentication is based on spring security.

the idea is to have a mobile (android) application to be able to se

6条回答
  •  南笙
    南笙 (楼主)
    2020-12-14 08:57

    You should configure spring to support basic authentication. Then add to your request the following header:

    • name: Authorization
    • value: base64(username:password)

    That means that user name and password should be cocatenated into one string with : as separator and then transformed using BASE64 transformation.

提交回复
热议问题