Spring Basic authentication -


Hello, I have some login form configurations for authentication and I can write my normal login form

  Response.setHeader ("WWW-authentication", "original realm = \" / \ ""); Response.setStatus (401); Response.setHeader ("location", URL);   

And spnegoAuthenticationProcessingFilter has been used to treat this form:

  & lt; Div id = "login-box" & gt; & Lt; H3 & gt; Login with username and password & lt; / H3 & gt; & Lt; C: if test = "$ {empty error}" & gt; & Lt; Div class = "error" & gt; $ {Error} & lt; / Div & gt; & Lt; / C: If & gt; & Lt; C: If test = "$ {empty msg} no" & gt; & Lt; Div class = "msg" & gt; $ {Msg} & lt; / Div & gt; & Lt; / C: If & gt; & Lt; Form name = 'loginForm' action = "& lt; c: url value = 'j_spring_security_check' / & gt; Method = 'post' & gt; & Lt; Table & gt; & Lt; TR & gt; & Lt; TD & gt; User: & lt; / TD & gt; & Lt; Td> & Lt; Input type = 'text' name = 'j_username' value = '' & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; Password: & lt; / TD & gt; & Lt; Td> & Lt; Input type = 'password' name = 'j_password' / & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td colspan = '2' & gt; & Lt; Input name = "submit" type = "submit" value = "submit" gt; & Lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / Form & gt; & Lt; / Div & gt;   

This is my spring security configuration:

  & lt ;? Xml version = "1.0" encoding = "UTF-8" & gt; & Lt; Beans xmlns = "http://www.springframework.org/schema/beans" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns: sec = "http: // www. Springframework.org/schema/security "xsi: schema location =" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http: //www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd"> & Lt; Sec: http entry-point-riff = "spnegoEntryPoint" auto-config = "false" & gt; & Lt; Sec: blocking-url pattern = "/ login *" access = "IS_AUTHENTICATED_ANONYMOUSLY" /> & Lt; Sec: blocking-url pattern = "/ **" access = "ROLE_USER" /> & Lt; Sec: custom-filter ref = "spnego authentication processing filterer" status = "BASIC_AUTH_FILTER" /> & Lt; Sec: Form-login login page = "/ login" default-target-url = "/ hello" always-use-default-target = "true" /> & Lt; / Sec: http & gt; & Lt; Bean id = "spnegoEntryPoint" class = "org.springframework.security.extensions.kerberos.web.SpnegoEntryPoint" /> & Lt; Bean id = "spnego authorization processing filterer" class = "org.springframework.security.extensions.kerberos.web.SpnegoAuthenticationProcessingFilter" & gt; & Lt; Property Name = "Authentication Manager" Riff = "Authentication Manager" / & gt; & Lt; / Bean & gt; & Lt; Sec: authentication-manager aliases = "authentication manager" & gt; & Lt; Sec: authentication-provider referee = "Kerber's authentication provider" & gt; & Lt; / Sec: authentication-manager & gt; & Lt ;! - Entry form auth - & gt; & Lt; Bean id = "Kerber's anticipation response" class = "org.springframework.security.extensions.kerberos.KerberosAuthenticationProvider" & gt; & Lt; Property Name = "Kerber's Client" & gt; & Lt; Bean class = "org.springframework.security.extensions.kerberos.SunJaasKerberosClient" & gt; & Lt; Property name = "debug" value = "true" /> & Lt; / Bean & gt; & Lt; / Property & gt; & Lt; Property Name = "userDetailsService" ref = "dummyUserDetailsService" /> & Lt; / Bean & gt; & Lt; Bean square = "org.springframework.security.extensions.kerberos.GlobalSunJaasKerberosConfig" & gt; & Lt; Property name = "debug" value = "true" /> & Lt; Property Name = "krbConfLocation" value = "/ apps / bin / krb5 / krb5.conf" /> & Lt; / Bean & gt; & Lt; Bean id = "Dummy user detailsSwas" class = "com.web.ldap.DummyUserDetailsService" / & gt; & Lt; / Bean & gt;   

Is this possible?

I do this

  & lt; Sec: http & gt; & Lt; Sec: blocking-url pattern = "/ **" access = "ROLE_USER" /> & Lt; Sec: http-basic entry-point-riff = "spnegoEntryPoint" /> & Lt ;! - & lt; Sec: Custom filter ref = "spnego authentication process filter" status = "BASIC_AUTH_FILTER" /> - & gt; & Lt; / Sec: http & gt;   

But now I do not have spnegoAuthenticationProcessingFilter is working ...

If I reduce custom-filters, my application will not work

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -