Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Benutzerdaten aus einer SQL-Datenbank können über die SqlSyncSource synchronisiert werden. Die Verbindung wird über das ConnectionString-Element aufgebaut, welche auch verschlüsselt abgelegt werden kann.

...

Beispiel: MS SQL

Code Block
breakoutModelanguagewidesql
SELECT FirstName, LastName FROM Users WHERE Email = @queryKey
Info

...

Das Mapping wird ebenfalls unterstützt.

...

Konfiguration

Code Block
languagexml
<?xml version="1.0" encoding="utf-8" ?>
<UserSyncConfig>
	  <SqlSyncSource name="Sql" queryKey="OneOffixxIdentifier">
        <ConnectionString>Data Source=sqlserver.local;Initial Catalog=SampleData;User ID=user;Password=pw;Encrypt=False</ConnectionString>
        <ConnectionProvider>System.Data.SqlClient</ConnectionProvider>
		    <Query>SELECT [givenname],[surname], [email] FROM [Table] WHERE UserId = @queryKey</Query>
		
		    
    <!-- Optional: Result Mapping Syntax is supported -->
   
    <ResultMapping>
            <Mapping>
      
         <Map Source="email" Target="fromMappingEMail" />
       </Mapping>
    </Mapping>ResultMapping>
    
   </ResultMapping>		
		 		<!-- Claim Mapping - column names are property names-->
        <Claims>

           <Claim type="http://schema.oneoffixx.com/ws/2011/01/identity/claims/givenname" ignoreClaimIfEmpty="true" property="givenname" />
            <Claim type="http://schema.oneoffixx.com/ws/2011/01/identity/claims/surname" ignoreClaimIfEmpty="true" property="surname" />
			
      <Claim type="http://schema.oneoffixx.com/ws/2011/01/identity/claims/email" ignoreClaimIfEmpty="true" property="fromMappingEMail" />
        </Claims>  
 
  </SqlSyncSource>
</UserSyncConfig>

...