SecurityTokenHandler.GetTokenTypeIdentifiers 메서드

정의

파생 클래스에서 재정의되는 경우 요청에 사용된 URI를 반환하여 해당 클래스에 의해 처리된 형식의 토큰을 식별합니다.

public:
 abstract cli::array <System::String ^> ^ GetTokenTypeIdentifiers();
public abstract string[] GetTokenTypeIdentifiers ();
abstract member GetTokenTypeIdentifiers : unit -> string[]
Public MustOverride Function GetTokenTypeIdentifiers () As String()

반환

String[]

이 처리기에서 지원하는 토큰 형식을 식별하는 URI 집합입니다.

예제

다음 코드를 재정의 하는 방법을 보여 줍니다는 GetTokenTypeIdentifiers 메서드를 사용자 지정 토큰에 대 한 토큰 형식 식별자를 반환 합니다. 코드에서 수행 되는 Custom Token 샘플입니다. 이 샘플의 간단한 웹 토큰 (SWT) 처리를 사용 하도록 설정 하는 사용자 지정 클래스를 제공 합니다. 이 샘플 및 WIF 및 다운로드할 위치에 사용할 수 있는 다른 샘플에 대 한 정보를 참조 하세요 WIF 코드 샘플 인덱스합니다.

public const string SimpleWebTokenTypeUri = "http://schemas.xmlsoap.org/ws/2009/11/swt-token-profile-1.0";
/// <summary>
/// Returns the simple web token's token type that is supported by this handler.
/// </summary> 
/// <returns>A list of supported token type identifiers.</returns>
public override string[] GetTokenTypeIdentifiers()
{
    return new string[] { SimpleWebTokenTypeUri };
}

설명

Type 의 현재 인스턴스에서 처리 하는 토큰을 통해 액세스 되는 TokenType 속성입니다. GetTokenTypeIdentifiers 메서드 토큰 형식을 참조 하는 메시지에 사용할 수 있는 허용 가능한 식별자 집합을 반환 합니다. URI 값을 사용 하는 예를 들어 합니다 <wst:TokenType> 요소 아래에 있는 <wst:RequestSecurityToken> 특정 유형의 토큰을 요청 하는 요소 (나타내는 WSTrustMessage.TokenType 개체 모델의 속성).

적용 대상