diff --git a/rhodecode/authentication/base.py b/rhodecode/authentication/base.py
--- a/rhodecode/authentication/base.py
+++ b/rhodecode/authentication/base.py
@@ -226,6 +226,15 @@ class RhodeCodeAuthPluginBase(object):
         """
         raise NotImplementedError("Not implemented in base class")
 
+    def get_url_slug(self):
+        """
+        Returns a slug which should be used when constructing URLs which refer
+        to this plugin. By default it returns the plugin name. If the name is
+        not suitable for using it in an URL the plugin should override this
+        method.
+        """
+        return self.name
+
     @property
     def is_headers_auth(self):
         """
diff --git a/rhodecode/authentication/routes.py b/rhodecode/authentication/routes.py
--- a/rhodecode/authentication/routes.py
+++ b/rhodecode/authentication/routes.py
@@ -45,7 +45,7 @@ class AuthnPluginResourceBase(AuthnResou
 
     def __init__(self, plugin):
         self.plugin = plugin
-        self.__name__ = plugin.name
+        self.__name__ = plugin.get_url_slug()
         self.display_name = plugin.get_display_name()