コード例 #1
0
        /// <summary>
        /// Constuctor of TeamsOAuth2Client.
        /// </summary>
        /// <param name="clientSecret">Client secret key.</param>
        /// <param name="clientId">Client id.</param>
        /// <param name="retryExecutor">Executor for retry.</param>
        /// <param name="retryNotificationFunc">Notification func for retry.</param>
        internal TeamsOAuth2Client(string clientSecret, string clientId, TeamsRetry retryExecutor = null, Func <TeamsResultInfo, int, bool> retryNotificationFunc = null)
        {
            this.teamsHttpClient = new TeamsHttpClient(null, TeamsAPIClient.TEAMS_API_URI_PATTERN, retryExecutor, retryNotificationFunc);

            this.clientId     = clientId;
            this.clientSecret = clientSecret;
        }
コード例 #2
0
        /// <summary>
        /// Constuctor of TeamsGuestIssuerClient.
        /// </summary>
        /// <param name="secret">Secret of the Guest Issuer.</param>
        /// <param name="guestIssuerId">Guest Issuer ID.</param>
        /// <param name="retryExecutor">Executor for retry.</param>
        /// <param name="retryNotificationFunc">Notification func for retry.</param>
        internal TeamsGuestIssuerClient(string secret, string guestIssuerId, TeamsRetry retryExecutor = null, Func <TeamsResultInfo, int, bool> retryNotificationFunc = null)
        {
            this.teamsHttpClient = new TeamsHttpClient(null, TeamsAPIClient.TEAMS_API_URI_PATTERN, retryExecutor, retryNotificationFunc);

            // For now, Webex Teams Guest Issuer uses HMAC-SHA256 for JWT signature.
            this.jwtSigner = new HMACSHA256(Convert.FromBase64String(secret));

            this.guestIssuerId = guestIssuerId;
        }