public async Task <ActionResult <JObject> > Get()
        {
            await _configService.GetMpConfigAsync();

            await _configService.GetOktaConfigAsync();

            return(new JObject());
        }
예제 #2
0
        public async Task <CrossroadsDecodedToken> DecodeAndValidateToken(string token, IOIDConfigurationService configService)
        {
            JwtSecurityToken decodedToken = DecodeToken(token);

            // Get updated configurations for auth servers
            var mpConfiguration = await configService.GetMpConfigAsync();

            var oktaConfiguration = await configService.GetOktaConfigAsync();

            JwtIssuer issuer = GetAndValidateIssuer(decodedToken, mpConfiguration, oktaConfiguration);

            ValidateToken(token, issuer.configuration);

            CrossroadsDecodedToken crossroadsDecodedToken = new CrossroadsDecodedToken
            {
                decodedToken = decodedToken,
                authProvider = issuer.authProvider
            };

            return(crossroadsDecodedToken);
        }