Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As WIF talks WS-Trust / WS-Federation under the hood, you can expose claims-based authentication at the services layer.</p> <p>This article shows how to create a WCF STS that will talk to external clients using these protocols. <a href="http://msdn.microsoft.com/en-us/library/ee748498.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ee748498.aspx</a></p> <p>From an authorisation point of view at the services layer you can use a custom authorisation manager to check that claims have been presented. <a href="http://msdn.microsoft.com/en-us/library/ms731774.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms731774.aspx</a></p> <p>To plug in external identity services such as OpenID and add your own claims into those generated by WIF then you can sub-class from ClaimsAuthenticationManager as follows:</p> <p><code> public class MyClaimsAuthenticationManager : ClaimsAuthenticationManager {</p> <pre><code> public override IClaimsPrincipal Authenticate(string resourceName, IClaimsPrincipal incomingPrincipal) { if (!incomingPrincipal.Identity.IsAuthenticated) { return incomingPrincipal; } //TODO: obtain user profile claims from external source, i.e. database, web service // below code demonstrates how to custom claims to the current principal // (which are then persisted for the lifecycle of the user's browser session) IClaimsIdentity identity = (IClaimsIdentity)incomingPrincipal.Identity; identity.Claims.Add(new Claim(ClaimTypes.Email, "dave@dave.com")); return incomingPrincipal; } } </code></pre> <p></code></p> <p>You'll need to tell WIF to use your own claims manager in the Web.config file by setting the claimsAuthenticationManager configuration parameter.</p> <p>Hope this helps.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload