Class HttpBasicConfigurer
java.lang.Object
com.codename1.backend.security.SecurityConfigurer
com.codename1.backend.security.HttpBasicConfigurer
Sign-in with HTTP Basic credentials on each request.
http.httpBasic(basic -> basic.realmName("Orders API"));
On a chain that also declares HttpSecurity.mfa(Customizer), a user who has a second
factor cannot sign in this way; see secondFactorExempt.
-
Method Summary
Modifier and TypeMethodDescriptionauthenticationEntryPoint(AuthenticationEntryPoint entryPoint) What answers a request whose credentials are refused, and -- when this is the chain's only way in -- one that sent none.voidconfigure(HttpSecurity http) Adds this part's filters; nothing by default.voidinit(HttpSecurity http) Shares what other parts need to know; nothing by default.The realm named in the challenge;Realmunless set.Lets a user who has a second factor in with their password alone.Methods inherited from class SecurityConfigurer
disable, getBuilder
-
Method Details
-
realmName
The realm named in the challenge;Realmunless set. -
authenticationEntryPoint
What answers a request whose credentials are refused, and -- when this is the chain's only way in -- one that sent none. -
secondFactorExempt
Lets a user who has a second factor in with their password alone.
On a chain with
HttpSecurity.mfa(Customizer), Basic credentials of a user who has a second factor are refused: they are a first factor sent with every request, with no step to present a code in, and accepting them would make the code optional for anyone who knows the password. Call this only when that is what is meant -- a chain whose Basic callers are scripts the user set up, on a network that is trusted. -
init
Description copied from class:SecurityConfigurerShares what other parts need to know; nothing by default.- Overrides:
initin classSecurityConfigurer
-
configure
Description copied from class:SecurityConfigurerAdds this part's filters; nothing by default.- Overrides:
configurein classSecurityConfigurer
-