'A short string representing the provider implementation id used for
serialization of :class:`.Credentials` and to identify the type of
provider in JavaScript.
The part before hyphen denotes the type of the provider, the part
after hyphen denotes the class id e.g.
``oauth2.Facebook.type_id = \'2-5\'``,
``oauth1.Twitter.type_id = \'1-5\'``.'

@property
def type_id(self):

    cls = self.__class__
    mod = sys.modules.get(cls.__module__)
    return ((str(self.PROVIDER_TYPE_ID) + '-') + str(mod.PROVIDER_ID_MAP.index(cls)))
