2
내가 하나가 기본적으로이에서 클라이언트 자격 증명을 전환 할 수 있다고 생각했을 것이다

:Thinktecture IdentityServer

var clientCredentials = new ClientCredentials(); 
clientCredentials.UserName.UserName = "MyUserName" 
clientCredentials.UserName.Password = "MyPassword" 

에 : 다음

var clientCredentials = new ClientCredentials(); 
clientCredentials.ClientCertificate.Certificate = myX509Certificate; 

과 wsTrustChannel을 만들어 보안 토큰을 얻습니다.

wsTrustChannelFactory.SetCredentials(clientCredentials); 

var channel = _wsTrustChannelFactory.CreateChannel(new EndpointAddress(endpointAddress)); 

var token = channel.Issue(new RequestSecurityToken 
{ 
    TokenType = tokenType, 
    AppliesTo = new EndpointReference(realm), 
    RequestType = RequestTypes.Issue, 
    KeyType = KeyTypes.Bearer 
}, out requestSecurityTokenResponse); 

사용자 이름과 암호가 올바르게 작동합니다. 인증서를 사용하기 만하면 UserName이 지정되지 않는다는 오류가 발생합니다. 토큰 발급자가 인증서에서 관련 사용자를 조회한다는 인상하에있었습니다. 내가 여기서 어디로 잘못 가고 있니?

답변

1

EDIT - 두 번! 나는 분명히 CertificateWSTrustBinding을 사용해야했을 때 Endpoint에 UserNameWSTrustBinding을 사용하고있었습니다. 이 변경으로이 문제가 해결되었습니다.


EDIT -이 문제를 해결 한 것으로 생각했지만이 끝점에서도 여전히 사용자 이름을 묻습니다. 어떤 아이디어?


웁스! 위의 질문을 게시 한 후 약 5 분 동안이 작업을 수행했습니다.

https://servername/identityserver/issue/wstrust/mixed/certificate 

대신

https://servername/identityserver/issue/wstrust/mixed/username 
: 인증서 인증에 대해 다른 엔드 포인트 주소가있다