def __init__(
            self,
            scope=None,
            authentication_method=AUTHENTICATION_METHOD,
            refreshable=REFRESHABLE):
        self.refreshable = refreshable
        if authentication_method not in [BEARER, MAC]:
            raise OAuth2Exception("Possible values for authentication_method"
                " are oauth2app.consts.MAC and oauth2app.consts.BEARER")
        self.authentication_method = authentication_method
        if scope is None:
            self.authorized_scope = None
        elif isinstance(scope, AccessRange):
            self.authorized_scope = set([scope.key])
        else:
            self.authorized_scope = set([x.key for x in scope])
dataset/ETHPy150Open hiidef/oauth2app/oauth2app/token.py/TokenGenerator.__init__/original