示例#1
0
 def test_with_changed_suffix(self):
     url = get_well_known_url('https://authlib.org',
                              suffix='openid-configuration')
     self.assertEqual(url, '/.well-known/openid-configuration')
     url = get_well_known_url('https://authlib.org',
                              external=True,
                              suffix='openid-configuration')
     self.assertEqual(
         url, 'https://authlib.org/.well-known/openid-configuration')
示例#2
0
 def test_no_suffix_issuer(self):
     self.assertEqual(get_well_known_url('https://authlib.org'),
                      WELL_KNOWN_URL)
     self.assertEqual(get_well_known_url('https://authlib.org/'),
                      WELL_KNOWN_URL)
示例#3
0
 def test_with_external(self):
     self.assertEqual(
         get_well_known_url('https://authlib.org', external=True),
         'https://authlib.org' + WELL_KNOWN_URL)
示例#4
0
 def test_with_suffix_issuer(self):
     self.assertEqual(get_well_known_url('https://authlib.org/issuer1'),
                      WELL_KNOWN_URL + '/issuer1')
     self.assertEqual(get_well_known_url('https://authlib.org/a/b/c'),
                      WELL_KNOWN_URL + '/a/b/c')