Spring Security manually setting authentication without authentication manager giving error -
i setting authentication manually in application using preauthenticatedauthenticationtoken. keep getting error follows,
no bean named 'org.springframework.security.authenticationmanager' defined: did forget add gobal element configuration (with child elements)?
i don't have userdetailsservice not required me. please me on how configure authentication manager ?
you missing <authentication-manager>
element. need have 1 processes preauthenticatedauthenticationtoken
, adding relevant roles user. if want no-op operation, that's fine, still has there, can either implement simple userdetailsservice
returns user object fixed role, or can implement authenticationprovider
directly , create final token in authenticate
method, want it. either way, configuration similar the 1 described in user manual.
Comments
Post a Comment