2016-08-04 14 views
0

最初のリクエスト中に以下の構成でCASサーバーにリダイレクトされます。しかし、ログイン後、アプリケーションにリダイレクトされません。これは、何が起こっているかである。CAS春のクライアント - ERR_TOO_MANY_REDIRECTSのため、アプリケーションへのリダイレクトが失敗しています。

  1. を開き、そのアプリケーションに戻ってリダイレクトではない、正しい資格情報を入力した後https://localhost:9443/cas/login?service=https%3A%2F%2Flocalhost%3A8443%2Ftest%2F
  2. にリダイレクトhttps://localhost:8443/test

  3. 。ブラウザのURLは同じCASログインURLで、ERR_TOO_MANY_REDIRECTSのためページが壊れています。

    <security:http entry-point-ref="casEntryPoint"> 
        <security:intercept-url pattern="/**" access="hasRole('ROLE_USER')" /> 
        <security:custom-filter position="CAS_FILTER" 
         ref="casFilter" /> 
    </security:http> 
    
    <bean id="casEntryPoint" 
        class="org.springframework.security.cas.web.CasAuthenticationEntryPoint"> 
        <property name="loginUrl" value="https://localhost:9443/cas/login/" /> 
        <property name="serviceProperties" ref="serviceProperties" /> 
    </bean> 
    
    <bean id="casFilter" 
        class="org.springframework.security.cas.web.CasAuthenticationFilter"> 
        <property name="authenticationManager" ref="authenticationManager" /> 
    </bean> 
    
    <security:authentication-manager alias="authenticationManager"> 
        <security:authentication-provider 
         ref="casAuthenticationProvider" /> 
    </security:authentication-manager> 
    
    <bean id="casAuthenticationProvider" 
        class="org.springframework.security.cas.authentication.CasAuthenticationProvider"> 
        <property name="authenticationUserDetailsService"> 
         <bean 
          class="org.springframework.security.core.userdetails.UserDetailsByNameServiceWrapper"> 
          <constructor-arg ref="userService" /> 
         </bean> 
        </property> 
        <property name="serviceProperties" ref="serviceProperties" /> 
        <property name="ticketValidator"> 
         <bean class="org.jasig.cas.client.validation.Cas20ServiceTicketValidator"> 
          <constructor-arg index="0" value="https://localhost:9443/cas/" /> 
         </bean> 
        </property> 
        <property name="key" value="an_id_for_this_auth_provider_only" /> 
    </bean> 
    
    <security:user-service id="userService"> 
        <security:user name="admin" password="admin" authorities="ROLE_USER" /> 
    </security:user-service> 
    
    <bean id="serviceProperties" class="org.springframework.security.cas.ServiceProperties"> 
        <property name="service" value="https://localhost:8443/test/" /> 
        <property name="sendRenew" value="false" /> 
    </bean> 
    

答えて

0

私は私のUIファイルに固有のものです**へ/ newviews/** /からの設定以下のパターンを変更したときにこれが解決されます。

<security:intercept-url pattern="/newviews/**" access="hasRole('ROLE_USER')" /> 
関連する問題