1

基本スプリングアプリhttps://github.com/UniconLabs/shibboleth-sample-java-spをshibboleth idpとldapに統合することができます。 ログインとログアウトの機能が正常に動作しています。 しかし、sp(春のアプリ)の姓、名、一般名などのユーザー属性を取得することに関連するドキュメントは見つかりませんでした。spring spのユーザ属性をldap + shibboleth idpから取得

私を助けてください。

答えて

1
 Authentication authentication = SecurityContextHolder.getContext() 
       .getAuthentication(); 
     SAMLCredential credential = (SAMLCredential) authentication 
       .getCredentials(); 

     for(Attribute attribute: credential.getAttributes()){ 
      List<XMLObject> values= attribute.getAttributeValues(); 
      for(XMLObject value: values){ 
       System.out.println(value.getDOM().getTextContent()); 

      } 
     } 
関連する問題