public override ProviderCredentials CreateCredentials( ClaimsIdentity claimsIdentity) { Claim name = claimsIdentity.FindFirst(ClaimTypes.NameIdentifier); Claim providerAccessToken = claimsIdentity .FindFirst(ServiceClaimTypes.ProviderAccessToken); LinkedInCredentials credentials = new LinkedInCredentials { UserId = this.TokenHandler.CreateUserId(this.Name, name != null ? name.Value : null), AccessToken = providerAccessToken != null ? providerAccessToken.Value : null }; return credentials; }
public override ProviderCredentials CreateCredentials( ClaimsIdentity claimsIdentity) { Claim name = claimsIdentity.FindFirst(ClaimTypes.NameIdentifier); Claim providerAccessToken = claimsIdentity .FindFirst(ServiceClaimTypes.ProviderAccessToken); LinkedInCredentials credentials = new LinkedInCredentials { UserId = this.TokenHandler.CreateUserId(this.Name, name != null ? name.Value : null), AccessToken = providerAccessToken != null ? providerAccessToken.Value : null }; return(credentials); }