. Authorization, Basic Base64Encoded(username:password). , peeskillet pass, I, ,
Authorization: Basic cGVlc2tpbGxldDpwYXNz
. web.xml. 48.2 - Java EE.
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
SSL. .
, .., , Basic Auth ContainerRequestFilter .
, jersey/examples/https-clientserver-grizzly. SecurityFilter
:
Authorization. , AuthenticationException. AuthenticationExceptionMapper "WWW-Authenticate", "Basic realm=\"" + e.getRealm() + "\", Basic Auth
, , Base64: password. , , . - , WebApplicationException, 400 Bad Request.
. , user, password, . - , AuthenticationException
, a user authenticate Authorizer ( SecurityContext). JAX-RS SecurityContext `.
, , @RolesAllowed . , RolesAllowedDynamicFeature.
, , SecurityContext . , , Authorizer, isUserInRole. @RolesAllowed({"ADMIN"}). , SecurityContext, , .
. , ( Firefox) , . cURL,
C:/>curl -v -u username:password http://localhost:8080/blah/resource
. - -v . API- , , . Base64 , .
SSL, , .