protected override SecurityToken EndGetTokenCore(IAsyncResult result)
        {
            RmsOperationType rmsOperationType = this.offer.Equals(Offer.IPCCertificationSTS) ? RmsOperationType.AcquireB2BRac : RmsOperationType.AcquireB2BLicense;

            if (this.cachedSecurityToken != null)
            {
                this.latencyTracker.BeginTrackRmsLatency(rmsOperationType);
                return(this.cachedSecurityToken);
            }
            RequestedToken rt = this.securityTokenService.EndIssueToken(result);

            this.latencyTracker.EndAndBeginTrackRmsLatency(RmsOperationType.RequestDelegationToken, rmsOperationType);
            this.cachedSecurityToken = SamlSecurityTokenProvider.CreateToken(rt);
            return(this.cachedSecurityToken);
        }
 protected override SecurityToken GetTokenCore(TimeSpan timeout)
 {
     return(SamlSecurityTokenProvider.CreateToken(this.securityTokenService.IssueToken(this.CreateDelegationTokenRequest())));
 }