예제 #1
0
        private string GetAuthorisationUrl(string codeVerifier)
        {
            var details = new AuthorisationCodeDetails(codeVerifier, "http://localhost:5000/");
            var scopes  = _config.GetSection("requiredScopes").Get <List <string> >();

            details.AuthorisationUri = BuildAuthorisationUri(_config.GetSection("clientId").Value, details.RedirectUri, details.CodeChallenge, "fh82hfosdf8h", string.Join("%20", scopes));

            return(details.AuthorisationUri);
        }
예제 #2
0
        private string GetAuthorisationUrl(string codeVerifier)
        {
            var details = new AuthorisationCodeDetails(codeVerifier, "http://localhost:5000/");
            var scopes  = _appSettings.RequiredScopes;

            details.AuthorisationUri = BuildAuthorisationUri(
                _appSettings.ClientId,
                details.RedirectUri,
                details.CodeChallenge,
                "fh82hfosdf8h",
                string.Join("%20", scopes)
                );

            return(details.AuthorisationUri);
        }
예제 #3
0
 public AuthenticationManager(IConfigurationRoot config)
 {
     _config       = config;
     _codeVerifier = AuthorisationCodeDetails.CreateCodeVerifier();
     _httpClient   = new HttpClient();
 }
예제 #4
0
 public AuthenticationManager(AppSettings settingsConfig)
 {
     _appSettings  = settingsConfig;
     _codeVerifier = AuthorisationCodeDetails.CreateCodeVerifier();
     _httpClient   = new HttpClient();
 }