<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2012 SURFnet bv, The Netherlands

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xmlns:security="http://www.springframework.org/schema/security"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
    http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
    http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">

  <mvc:annotation-driven/>
  <context:component-scan base-package="nl.surfnet.coin.api" />
  <context:component-scan base-package="nl.surfnet.coin.teams" />

  <!-- Authorization annotations on service methods -->
  <security:global-method-security pre-post-annotations="enabled"/>

  <!--
    One configuration entry for /social/rest/**, regardless of OAuth-version. For both versions
    a filter is included. Only if both fail (i.e. do not put an Authentication object in the Security Context)
    the request will be rejected.
  -->
  <security:http pattern="/social/rest/**" authentication-manager-ref="shibbolethAuthenticationManager"
                 access-decision-manager-ref="accessDecisionManager"
                 entry-point-ref="shibbolethEntryPoint">
    <security:anonymous enabled="false" />
    <security:intercept-url pattern="/social/rest/**" access="ROLE_USER,SCOPE_READ"/>
    <security:custom-filter ref="oauth2ProviderFilter" before="FILTER_SECURITY_INTERCEPTOR" />
    <security:custom-filter ref="oauthProtectedResourceFilter" after="EXCEPTION_TRANSLATION_FILTER" />
  </security:http>

	<security:http pattern="/mock10/social/rest/**" authentication-manager-ref="shibbolethAuthenticationManager"
                 access-decision-manager-ref="accessDecisionManager"
                 entry-point-ref="shibbolethEntryPoint">
    <security:anonymous enabled="false" />
    <security:intercept-url pattern="/mock10/social/rest/**" access="ROLE_USER,SCOPE_READ"/>
    <security:custom-filter ref="oauth2ProviderFilter" before="FILTER_SECURITY_INTERCEPTOR" />
    <security:custom-filter ref="oauthProtectedResourceFilter" after="EXCEPTION_TRANSLATION_FILTER" />
  </security:http>

	<security:http pattern="/mock10/social/rest/**" security="none"/>
  <security:http pattern="/css/**" security="none"/>
  <security:http pattern="/images/**" security="none"/>
  <security:http pattern="/favicon.ico" security="none"/>
  <security:http pattern="/configure/**" security="none"/>
  
  <bean id="clientDetailsService" class="${clientDetailsServiceClass}" />

  <bean id="janusClient" class="nl.surfnet.coin.janus.JanusRestClient" />

  <bean id="shibbolethEntryPoint" class="nl.surfnet.coin.api.oauth.ShibbolethAuthenticationEntryPoint"><commit_msg>bugfix for broken build<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2012 SURFnet bv, The Netherlands

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xmlns:security="http://www.springframework.org/schema/security"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
    http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
    http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">

  <mvc:annotation-driven/>
  <context:component-scan base-package="nl.surfnet.coin.api" />
  <context:component-scan base-package="nl.surfnet.coin.teams" />

  <!-- Authorization annotations on service methods -->
  <security:global-method-security pre-post-annotations="enabled"/>

  <!--
    One configuration entry for /social/rest/**, regardless of OAuth-version. For both versions
    a filter is included. Only if both fail (i.e. do not put an Authentication object in the Security Context)
    the request will be rejected.
  -->
  <security:http pattern="/social/rest/**" authentication-manager-ref="shibbolethAuthenticationManager"
                 access-decision-manager-ref="accessDecisionManager"
                 entry-point-ref="shibbolethEntryPoint">
    <security:anonymous enabled="false" />
    <security:intercept-url pattern="/social/rest/**" access="ROLE_USER,SCOPE_READ"/>
    <security:custom-filter ref="oauth2ProviderFilter" before="FILTER_SECURITY_INTERCEPTOR" />
    <security:custom-filter ref="oauthProtectedResourceFilter" after="EXCEPTION_TRANSLATION_FILTER" />
  </security:http>

	<security:http pattern="/mock10/social/rest/**" authentication-manager-ref="shibbolethAuthenticationManager"
                 access-decision-manager-ref="accessDecisionManager"
                 entry-point-ref="shibbolethEntryPoint">
    <security:anonymous enabled="false" />
    <security:intercept-url pattern="/mock10/social/rest/**" access="ROLE_USER,SCOPE_READ"/>
    <security:custom-filter ref="oauth2ProviderFilter" before="FILTER_SECURITY_INTERCEPTOR" />
    <security:custom-filter ref="oauthProtectedResourceFilter" after="EXCEPTION_TRANSLATION_FILTER" />
  </security:http>

  <security:http pattern="/css/**" security="none"/>
  <security:http pattern="/images/**" security="none"/>
  <security:http pattern="/favicon.ico" security="none"/>
  <security:http pattern="/configure/**" security="none"/>
  
  <bean id="clientDetailsService" class="${clientDetailsServiceClass}" />

  <bean id="janusClient" class="nl.surfnet.coin.janus.JanusRestClient" />

  <bean id="shibbolethEntryPoint" class="nl.surfnet.coin.api.oauth.ShibbolethAuthenticationEntryPoint">
{'fraction_non_alphanumeric': 0.13735298093821818, 'fraction_numerical': 0.008381776395836149, 'mean_word_length': 4.451731761238025, 'pattern_counts': {'":': 0, '<': 60, '<?xml version=': 2, '>': 60, 'https://': 0, 'lorem ipsum': 0, 'www.': 28, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3516423', 'n_tokens_mistral': 2171, 'n_tokens_neox': 2107, 'n_words': 411}