Python akad.ttypes.IdentityProvider.LINE Examples
The following are 9
code examples of akad.ttypes.IdentityProvider.LINE().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
akad.ttypes.IdentityProvider
, or try the search function
.
Example #1
Source File: auth.py From dpk with GNU General Public License v3.0 | 5 votes |
def loginWithQrCode(self, keepLoggedIn=True, systemName=None, appName=None, showQr=True): if systemName is None: systemName=self.server.SYSTEM_NAME if appName is None: appName=self.server.APP_NAME self.server.setHeaders('X-Line-Application', appName) self.tauth = Session(self.server.LINE_HOST_DOMAIN, self.server.Headers, self.server.LINE_AUTH_QUERY_PATH).Talk(isopen=False) qrCode = self.tauth.getAuthQrcode(keepLoggedIn, systemName) self.callback.QrUrl('line://au/q/' + qrCode.verifier, showQr) self.server.setHeaders('X-Line-Access', qrCode.verifier) getAccessKey = self.server.getJson(self.server.parseUrl(self.server.LINE_CERTIFICATE_PATH), allowHeader=True) self.auth = Session(self.server.LINE_HOST_DOMAIN, self.server.Headers, self.server.LINE_LOGIN_QUERY_PATH).Auth(isopen=False) try: lReq = self.__loginRequest('1', { 'keepLoggedIn': keepLoggedIn, 'systemName': systemName, 'identityProvider': IdentityProvider.LINE, 'verifier': getAccessKey['result']['verifier'], 'accessLocation': self.server.IP_ADDR, 'e2eeVersion': 0 }) result = self.auth.loginZ(lReq) except: raise Exception('Login failed') if result.type == LoginResultType.SUCCESS: if result.authToken is not None: self.loginWithAuthToken(result.authToken, appName) else: return False else: raise Exception('Login failed')
Example #2
Source File: auth.py From Protect4 with GNU General Public License v3.0 | 5 votes |
def qrLogin(self, keepLoggedIn=True, systemName=None, appName=None, showQr=False): if systemName is None: systemName=self.server.SYSTEM_NAME if appName is None: appName=self.server.APP_NAME self.server.setHeaders('X-Line-Application', appName) self.tauth = Session(self.server.LINE_HOST_DOMAIN, self.server.Headers, self.server.LINE_AUTH_QUERY_PATH).Talk(isopen=False) qrCode = self.tauth.getAuthQrcode(keepLoggedIn, systemName) self.callback.QrUrl("line://au/q/" + qrCode.verifier, showQr) self.server.setHeaders('X-Line-Access', qrCode.verifier) getAccessKey = self.server.getJson(self.server.parseUrl(self.server.LINE_CERTIFICATE_PATH), allowHeader=True) self.auth = Session(self.server.LINE_HOST_DOMAIN, self.server.Headers, self.server.LINE_LOGIN_QUERY_PATH).Auth(isopen=False) try: lReq = self.loginRequest('1', { 'keepLoggedIn': keepLoggedIn, 'systemName': systemName, 'identityProvider': IdentityProvider.LINE, 'verifier': getAccessKey['result']['verifier'], 'accessLocation': self.server.IP_ADDR, 'e2eeVersion': 0 }) result = self.auth.loginZ(lReq) except: raise Exception("Login failed") if result.type == LoginResultType.SUCCESS: if result.authToken is not None: self.tokenLogin(result.authToken, appName) else: return False else: raise Exception("Login failed")
Example #3
Source File: auth.py From Aditmadzs2 with GNU General Public License v3.0 | 5 votes |
def qrLogin(self, keepLoggedIn=True, systemName=None, appName=None, showQr=False): if systemName is None: systemName=self.server.SYSTEM_NAME if appName is None: appName=self.server.APP_NAME self.server.setHeaders('X-Line-Application', appName) self.tauth = Session(self.server.LINE_HOST_DOMAIN, self.server.Headers, self.server.LINE_AUTH_QUERY_PATH).Talk(isopen=False) qrCode = self.tauth.getAuthQrcode(keepLoggedIn, systemName) self.callback.QrUrl("line://au/q/" + qrCode.verifier, showQr) self.server.setHeaders('X-Line-Access', qrCode.verifier) getAccessKey = self.server.getJson(self.server.parseUrl(self.server.LINE_CERTIFICATE_PATH), allowHeader=True) self.auth = Session(self.server.LINE_HOST_DOMAIN, self.server.Headers, self.server.LINE_LOGIN_QUERY_PATH).Auth(isopen=False) try: lReq = self.loginRequest('1', { 'keepLoggedIn': keepLoggedIn, 'systemName': systemName, 'identityProvider': IdentityProvider.LINE, 'verifier': getAccessKey['result']['verifier'], 'accessLocation': self.server.IP_ADDR, 'e2eeVersion': 0 }) result = self.auth.loginZ(lReq) except: raise Exception("Login failed") if result.type == LoginResultType.SUCCESS: if result.authToken is not None: self.tokenLogin(result.authToken, appName) else: return False else: raise Exception("Login failed")
Example #4
Source File: auth.py From final with GNU General Public License v3.0 | 5 votes |
def loginWithQrCode(self, keepLoggedIn=True, systemName=None, appName=None, showQr=False): if systemName is None: systemName=self.server.SYSTEM_NAME if appName is None: appName=self.server.APP_NAME self.server.setHeaders('X-Line-Application', appName) self.tauth = Session(self.server.LINE_HOST_DOMAIN, self.server.Headers, self.server.LINE_AUTH_QUERY_PATH).Talk(isopen=False) qrCode = self.tauth.getAuthQrcode(keepLoggedIn, systemName) self.callback.QrUrl('line://au/q/' + qrCode.verifier, showQr) self.server.setHeaders('X-Line-Access', qrCode.verifier) getAccessKey = self.server.getJson(self.server.parseUrl(self.server.LINE_CERTIFICATE_PATH), allowHeader=True) self.auth = Session(self.server.LINE_HOST_DOMAIN, self.server.Headers, self.server.LINE_LOGIN_QUERY_PATH).Auth(isopen=False) try: lReq = self.__loginRequest('1', { 'keepLoggedIn': keepLoggedIn, 'systemName': systemName, 'identityProvider': IdentityProvider.LINE, 'verifier': getAccessKey['result']['verifier'], 'accessLocation': self.server.IP_ADDR, 'e2eeVersion': 0 }) result = self.auth.loginZ(lReq) except: raise Exception('Login failed') if result.type == LoginResultType.SUCCESS: if result.authToken is not None: self.loginWithAuthToken(result.authToken, appName) else: return False else: raise Exception('Login failed')
Example #5
Source File: auth.py From ajs2 with GNU General Public License v3.0 | 5 votes |
def qrLogin(self, keepLoggedIn=True, systemName=None, appName=None, showQr=False): if systemName is None: systemName=self.server.SYSTEM_NAME if appName is None: appName=self.server.APP_NAME self.server.setHeaders('X-Line-Application', appName) self.tauth = Session(self.server.LINE_HOST_DOMAIN, self.server.Headers, self.server.LINE_AUTH_QUERY_PATH).Talk(isopen=False) qrCode = self.tauth.getAuthQrcode(keepLoggedIn, systemName) self.callback.QrUrl("line://au/q/" + qrCode.verifier, showQr) self.server.setHeaders('X-Line-Access', qrCode.verifier) getAccessKey = self.server.getJson(self.server.parseUrl(self.server.LINE_CERTIFICATE_PATH), allowHeader=True) self.auth = Session(self.server.LINE_HOST_DOMAIN, self.server.Headers, self.server.LINE_LOGIN_QUERY_PATH).Auth(isopen=False) try: lReq = self.loginRequest('1', { 'keepLoggedIn': keepLoggedIn, 'systemName': systemName, 'identityProvider': IdentityProvider.LINE, 'verifier': getAccessKey['result']['verifier'], 'accessLocation': self.server.IP_ADDR, 'e2eeVersion': 0 }) result = self.auth.loginZ(lReq) except: raise Exception("Login failed") if result.type == LoginResultType.SUCCESS: if result.authToken is not None: self.tokenLogin(result.authToken, appName) else: return False else: raise Exception("Login failed")
Example #6
Source File: auth.py From SOLO with GNU General Public License v3.0 | 5 votes |
def qrLogin(self, keepLoggedIn=True, systemName=None, appName=None, showQr=False): if systemName is None: systemName=self.server.SYSTEM_NAME if appName is None: appName=self.server.APP_NAME self.server.setHeaders('X-Line-Application', appName) self.tauth = Session(self.server.LINE_HOST_DOMAIN, self.server.Headers, self.server.LINE_AUTH_QUERY_PATH).Talk(isopen=False) qrCode = self.tauth.getAuthQrcode(keepLoggedIn, systemName) self.callback.QrUrl("line://au/q/" + qrCode.verifier, showQr) self.server.setHeaders('X-Line-Access', qrCode.verifier) getAccessKey = self.server.getJson(self.server.parseUrl(self.server.LINE_CERTIFICATE_PATH), allowHeader=True) self.auth = Session(self.server.LINE_HOST_DOMAIN, self.server.Headers, self.server.LINE_LOGIN_QUERY_PATH).Auth(isopen=False) try: lReq = self.loginRequest('1', { 'keepLoggedIn': keepLoggedIn, 'systemName': systemName, 'identityProvider': IdentityProvider.LINE, 'verifier': getAccessKey['result']['verifier'], 'accessLocation': self.server.IP_ADDR, 'e2eeVersion': 0 }) result = self.auth.loginZ(lReq) except: raise Exception("Login failed") if result.type == LoginResultType.SUCCESS: if result.authToken is not None: self.tokenLogin(result.authToken, appName) else: return False else: raise Exception("Login failed")
Example #7
Source File: auth.py From line-py with BSD 3-Clause "New" or "Revised" License | 5 votes |
def loginWithQrCode(self, keepLoggedIn=True, systemName=None, appName=None, showQr=False): if systemName is None: systemName=self.server.SYSTEM_NAME if appName is None: appName=self.server.APP_NAME self.server.setHeaders('X-Line-Application', appName) self.tauth = Session(self.server.LINE_HOST_DOMAIN, self.server.Headers, self.server.LINE_AUTH_QUERY_PATH).Talk(isopen=False) qrCode = self.tauth.getAuthQrcode(keepLoggedIn, systemName) self.callback.QrUrl('line://au/q/' + qrCode.verifier, showQr) self.server.setHeaders('X-Line-Access', qrCode.verifier) getAccessKey = self.server.getJson(self.server.parseUrl(self.server.LINE_CERTIFICATE_PATH), allowHeader=True) self.auth = Session(self.server.LINE_HOST_DOMAIN, self.server.Headers, self.server.LINE_LOGIN_QUERY_PATH).Auth(isopen=False) try: lReq = self.__loginRequest('1', { 'keepLoggedIn': keepLoggedIn, 'systemName': systemName, 'identityProvider': IdentityProvider.LINE, 'verifier': getAccessKey['result']['verifier'], 'accessLocation': self.server.IP_ADDR, 'e2eeVersion': 0 }) result = self.auth.loginZ(lReq) except: raise Exception('Login failed') if result.type == LoginResultType.SUCCESS: if result.authToken is not None: self.loginWithAuthToken(result.authToken, appName) else: return False else: raise Exception('Login failed')
Example #8
Source File: auth.py From sb with GNU General Public License v3.0 | 5 votes |
def loginWithQrCode(self, keepLoggedIn=True, systemName=None, appName=None, showQr=False): if systemName is None: systemName=self.server.SYSTEM_NAME if appName is None: appName=self.server.APP_NAME self.server.setHeaders('X-Line-Application', appName) self.tauth = Session(self.server.LINE_HOST_DOMAIN, self.server.Headers, self.server.LINE_AUTH_QUERY_PATH).Talk(isopen=False) qrCode = self.tauth.getAuthQrcode(keepLoggedIn, systemName) self.callback.QrUrl('line://au/q/' + qrCode.verifier, showQr) self.server.setHeaders('X-Line-Access', qrCode.verifier) getAccessKey = self.server.getJson(self.server.parseUrl(self.server.LINE_CERTIFICATE_PATH), allowHeader=True) self.auth = Session(self.server.LINE_HOST_DOMAIN, self.server.Headers, self.server.LINE_LOGIN_QUERY_PATH).Auth(isopen=False) try: lReq = self.__loginRequest('1', { 'keepLoggedIn': keepLoggedIn, 'systemName': systemName, 'identityProvider': IdentityProvider.LINE, 'verifier': getAccessKey['result']['verifier'], 'accessLocation': self.server.IP_ADDR, 'e2eeVersion': 0 }) result = self.auth.loginZ(lReq) except: raise Exception('Login failed') if result.type == LoginResultType.SUCCESS: if result.authToken is not None: self.loginWithAuthToken(result.authToken, appName) else: return False else: raise Exception('Login failed')
Example #9
Source File: auth.py From linepy-modified with BSD 3-Clause "New" or "Revised" License | 4 votes |
def loginWithQrCode(self): if self.systemName is None: self.systemName=self.server.SYSTEM_NAME if self.appName is None: self.appName=self.server.APP_NAME self.server.setHeaders('X-Line-Application', self.appName) self.tauth = Session(self.server.LINE_HOST_DOMAIN, self.server.Headers, self.server.LINE_AUTH_QUERY_PATH).Talk(isopen=False) qrCode = self.tauth.getAuthQrcode(self.keepLoggedIn, self.systemName) if self.e2ee: params = self._e2ee.generateParams() self.callback.QrUrl('https://line.me/R/au/q/%s?%s' % (qrCode.verifier, params), self.showQr) else: self.callback.QrUrl('https://line.me/R/au/q/' + qrCode.verifier, self.showQr) self.server.setHeaders('X-Line-Access', qrCode.verifier) getAccessKey = self.server.getJson(self.server.parseUrl(self.server.LINE_CERTIFICATE_PATH), allowHeader=True) if self.e2ee: public_key = getAccessKey['result']['metadata']['publicKey'] encrypted_keychain = getAccessKey['result']['metadata']['encryptedKeyChain'] hash_keychain = getAccessKey['result']['metadata']['hashKeyChain'] keychain_data = self._e2ee.decryptKeychain(encrypted_keychain, public_key) print ('Public Key :', public_key) print ('Encrypted Keychain :', encrypted_keychain) print ('Hash Keychain :', hash_keychain) print ('Keychain Data :', keychain_data) self.auth = Session(self.server.LINE_HOST_DOMAIN, self.server.Headers, self.server.LINE_LOGIN_QUERY_PATH).Auth(isopen=False) try: lReq = self.__loginRequest('1', { 'keepLoggedIn': self.keepLoggedIn, 'systemName': self.systemName, 'identityProvider': IdentityProvider.LINE, 'verifier': getAccessKey['result']['verifier'], 'accessLocation': self.server.IP_ADDR, 'e2eeVersion': 1 if self.e2ee else 0 }) result = self.auth.loginZ(lReq) except: raise Exception('Login failed') if result.type == LoginResultType.SUCCESS: if result.authToken is not None: self.loginWithAuthToken(result.authToken) else: return False else: raise Exception('Login failed')