ASPC.Marvel.CrimeAPI.TokenHelper.GetS2SAccessTokenWithWindowsIdentity C# (CSharp) 메소드

GetS2SAccessTokenWithWindowsIdentity() 공개 정적인 메소드

Retrieves an S2S access token signed by the application's private certificate on behalf of the specified WindowsIdentity and intended for the SharePoint at the targetApplicationUri. If no Realm is specified in web.config, an auth challenge will be issued to the targetApplicationUri to discover it.
public static GetS2SAccessTokenWithWindowsIdentity ( Uri targetApplicationUri, System.Security.Principal.WindowsIdentity identity ) : string
targetApplicationUri System.Uri Url of the target SharePoint site
identity System.Security.Principal.WindowsIdentity Windows identity of the user on whose behalf to create the access token
리턴 string
        public static string GetS2SAccessTokenWithWindowsIdentity(
            Uri targetApplicationUri,
            WindowsIdentity identity)
        {
            string realm = string.IsNullOrEmpty(Realm) ? GetRealmFromTargetUrl(targetApplicationUri) : Realm;

            JsonWebTokenClaim[] claims = identity != null ? GetClaimsWithWindowsIdentity(identity) : null;

            return GetS2SAccessTokenWithClaims(targetApplicationUri.Authority, realm, claims);
        }