Example #1
0
        public ClientTokenManager(IOptions <SecurityOptions> options)
        {
            this.options = options.Value;

            if (options.Value == null)
            {
                throw new Exception($"{nameof(ClientTokenManager)}: options null.");
            }
        }
Example #2
0
        public ClientTokenManager(IOptions <SecurityOptions> options, string authorityUrl)
        {
            this.options = options.Value;

            if (options.Value == null)
            {
                throw new Exception($"{nameof(ClientTokenManager)}: options null.");
            }

            this.options.AuthorityUrl = authorityUrl ?? this.options.AuthorityUrl;
        }