def create_authorization(self, scopes=github.GithubObject.NotSet, note=github.GithubObject.NotSet, note_url=github.GithubObject.NotSet, client_id=github.GithubObject.NotSet, client_secret=github.GithubObject.NotSet, onetime_password=None):
assert scopes is github.GithubObject.NotSet or all(isinstance(element, (str, unicode)) for element in scopes), scopes<EOL>assert note is github.GithubObject.NotSet or isinstance(note, (str, unicode)), note<EOL>assert note_url is github.GithubObject.NotSet or isinstance(note_url, (str, unicode)), note_url<EOL>assert client_id is github.GithubObject.NotSet or isinstance(client_id, (str, unicode)), client_id<EOL>assert client_secret is github.GithubObject.NotSet or isinstance(client_secret, (str, unicode)), client_secret<EOL>assert onetime_password is None or isinstance(onetime_password, (str, unicode)), onetime_password<EOL>post_parameters = dict()<EOL>if scopes is not github.GithubObject.NotSet:<EOL><INDENT>post_parameters["<STR_LIT>"] = scopes<EOL><DEDENT>if note is not github.GithubObject.NotSet:<EOL><INDENT>post_parameters["<STR_LIT>"] = note<EOL><DEDENT>if note_url is not github.GithubObject.NotSet:<EOL><INDENT>post_parameters["<STR_LIT>"] = note_url<EOL><DEDENT>if client_id is not github.GithubObject.NotSet:<EOL><INDENT>post_parameters["<STR_LIT>"] = client_id<EOL><DEDENT>if client_secret is not github.GithubObject.NotSet:<EOL><INDENT>post_parameters["<STR_LIT>"] = client_secret<EOL><DEDENT>if onetime_password is not None:<EOL><INDENT>request_header = {Consts.headerOTP: onetime_password}  <EOL><DEDENT>else:<EOL><INDENT>request_header = None<EOL><DEDENT>headers, data = self._requester.requestJsonAndCheck(<EOL>"<STR_LIT:POST>",<EOL>"<STR_LIT>",<EOL>input=post_parameters,<EOL>headers=request_header,<EOL>)<EOL>return github.Authorization.Authorization(self._requester, headers, data, completed=True)<EOL>
:calls: `POST /authorizations <http://developer.github.com/v3/oauth>`_
:param scopes: list of string
:param note: string
:param note_url: string
:param client_id: string
:param client_secret: string
:param onetime_password: string
:rtype: :class:`github.Authorization.Authorization`