Monday, 15 April 2013

single sign on - SSO Implmentation using WIF -



single sign on - SSO Implmentation using WIF -

i want implement sso in mvc application using wif , sts ( claims base of operations authentication )

i have single database has user , application ( mvc application entries ) user can access ?

user can have access 1 or more mvc applications.

each application have links other applications.

if user logs in 1 application , has access 2 application has straight authenticated 2 application ( sso should take care )

i have implemented identity manger , securitytokenservice class.

i creating token next code

claimsidentity identity = new claimsidentity(authenticationtypes.federation); identity.addclaim(new claim(claimtypes.nameidentifier, userid.tostring())); identity.addclaim(new claim(claimtypes.name, username)); foreach (var role in roles) { identity.addclaim(new claim(claimtypes.role, role)); } claimsprincipal principal = new claimsprincipal(identity); var token = new system.identitymodel.tokens.sessionsecuritytoken(principal); system.identitymodel.services.federatedauthentication.sessionauthenticationmodule.writesessiontokentocookie(token);

now can tell me how should authenticate user 2 site, when clicks on 2 site link should not asked login if has access site.

single-sign-on wif

No comments:

Post a Comment