Created
July 20, 2015 04:40
-
-
Save ivanursul/853f918fbd7ed47ea34d to your computer and use it in GitHub Desktop.
security-context.xml for www.ivanursul.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <beans xmlns="http://www.springframework.org/schema/beans" | |
| xmlns:security="http://www.springframework.org/schema/security" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://www.springframework.org/schema/beans | |
| http://www.springframework.org/schema/beans/spring-beans-3.2.xsd | |
| http://www.springframework.org/schema/security | |
| http://www.springframework.org/schema/security/spring-security-3.1.xsd"> | |
| <security:global-method-security pre-post-annotations="enabled" secured-annotations="enabled"/> | |
| <security:http pattern="/api/**" use-expressions="true" create-session="never"> | |
| <security:intercept-url pattern="/api/**" access="isAuthenticated()" /> | |
| <security:http-basic entry-point-ref="customBasicAuthenticationEntryPoint"/> | |
| </security:http> | |
| <security:authentication-manager erase-credentials="true" alias="authenticationManager" > | |
| <security:authentication-provider user-service-ref="customUserDetailsService"> | |
| <security:password-encoder ref="passwordEncoder" base64="true"/> | |
| </security:authentication-provider> | |
| </security:authentication-manager> | |
| <bean id="customBasicAuthenticationEntryPoint" class="org.ivanursul.security.CustomBasicAuthenticationEntryPoint"> | |
| <constructor-arg value="RealmName" /> | |
| </bean> | |
| </beans> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment