Authentication of Tomcat URL, for example: https: // user: password@app.wibble.com

I am writing a tomcat application and need authentication in the url, for example:

https: // user: password@app.wibble.com

Except for my life, I’m not sure how to set it up or find documents to read it, it is clear that my skills with Google need to work.

Can someone tell me where I should look for such information or where to start?

Greetings

Andy

+3
source share
3 answers

Authentication of this method is called HTTP BASIC, which may help in your search :)

Essentially you need an element in your web.xml, like this

<login-config>
  <auth-method>BASIC</auth-method>
  <realm-name>myRealm</realm-name>
</login-config>

:

http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#Configuring%20a%20Realm

tomcat-users.xml

<security-constraint> web.xml .

, , , , BASIC. /. "" , , BASIC.

+2

, URL. RFC, '@' - app.wibble.com - of URL URL- URL . FTP, http.

, https://app.wibble.com/user/password, URL-. , .

0

URL- (, HTTP Basic Digest). ( "/" ) WWW-Authenticate, Tomcat, .

0

Source: https://habr.com/ru/post/1745511/


All Articles