2015-01-16 2 views
0

ios 응용 프로그램의 클레임 기반 인증 (Office 365 인증)을 사용하여 Sharepoint Online에 로그인하려고합니다. SOAP 메소드를 다음과 같이 사용했습니다.Office 365 사이트 모음 전용 인증

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" 
     xmlns:a="http://www.w3.org/2005/08/addressing" 
     xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> 
    <s:Header> 
    <a:Action s:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</a:Action> 
    <a:ReplyTo> 
     <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address> 
    </a:ReplyTo> 
    <a:To s:mustUnderstand="1">https://login.microsoftonline.com/extSTS.srf</a:To> 
    <o:Security s:mustUnderstand="1" 
     xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> 
     <o:UsernameToken> 
     <o:Username>$username</o:Username> 
     <o:Password>$password</o:Password> 
     </o:UsernameToken> 
    </o:Security> 
    </s:Header> 
    <s:Body> 
    <t:RequestSecurityToken xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust"> 
     <wsp:AppliesTo xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> 
     <a:EndpointReference> 
      <a:Address>$endpoint</a:Address> 
     </a:EndpointReference> 
     </wsp:AppliesTo> 
     <t:KeyType>http://schemas.xmlsoap.org/ws/2005/05/identity/NoProofKey</t:KeyType> 
     <t:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</t:RequestType> 
     <t:TokenType>urn:oasis:names:tc:SAML:1.0:assertion</t:TokenType> 
    </t:RequestSecurityToken> 
    </s:Body> 
</s:Envelope> 

공유 지점 루트 사이트 URL을 설정해야합니다. 로그인 사용자가 루트 사이트 에 대해 인증 할 수 없지만 사이트 모음에 대해서만 인증 할 수있는 경우이 사용자는 사무실 365에 로그인 할 수 없습니다. 어떻게 해결할 수 있습니까?

Office 365 인증 (클레임 기반 인증)으로 로그인하는 다른 방법 인 경우 을 알려주십시오.

답변

0

iOS SDK에서 Office 365 API를 체크 할 수 있습니다. 다음은 Office 365를 인증하고 액세스 토큰을 얻는 방법을 보여주는 GitHub의 샘플 응용 프로그램에 대한 링크입니다. 유효한 토큰을 얻으면 SharePoint Online에 REST 호출을 만들어 토큰을 권한 부여 보유자 헤더로 전달할 수 있습니다.

https://github.com/OfficeDev/Office-365-SDK-for-iOS