Returns the OatHeader
357844
def _parseOatHeader(self, data):
        """"""
        header = OatHeader.from_buffer(data)
        if header.magic != b'oat\n':
            raise BinaryError('No valid OAT file')

        key_value_store_bytes = (c_ubyte * header.keyValueStoreSize).from_buffer(data, sizeof(OatHeader))
        key_value_store = self.__parseKeyValueStore(key_value_store_bytes)

        return OatHeaderData(header=header, keyValueStoreRaw=key_value_store_bytes, keyValueStore=key_value_store)
1239
def get_authorized_tokens(self):
        
        resp, content = self.client.request(self.access_token_url, "GET")
        return dict(urlparse.parse_qsl(content))
242133
def resource_set_read(self, token, id):
        
        return self._realm.client.get(
            '{}/{}'.format(
                self.well_known['resource_registration_endpoint'], id),
            headers=self.get_headers(token)
        )
150502
def gettextdelimiter(self, retaintokenisation=False):
        """"""
        for e in self:
            if isinstance(e, New) or isinstance(e, Current):
                return e.gettextdelimiter(retaintokenisation)
        return ""
1109080
def GetAuth(self):
        '''
        '''
        if self.auth: return self.auth
        for elt in self.ps.GetMyHeaderElements():
            if elt.localName == 'BasicAuth' \
            and elt.namespaceURI == ZSI_SCHEMA_URI:
                d = _auth_tc.parse(elt, self.ps)
                self.auth = (AUTH.zsibasic, d['Name'], d['Password'])
                return self.auth
        ba = self.environ.get('HTTP_AUTHENTICATION')
        if ba:
            ba = ba.split(' ')
            if len(ba) == 2 and ba[0].lower() == 'basic':
                ba = _b64_decode(ba[1])
                self.auth = (AUTH.httpbasic,) + tuple(ba.split(':'))
                return self.auth
        self.auth = (AUTH.none,)
        return self.auth
1279080
def signed_raw(self) -> str:
        
        if not isinstance(self.identity, Identity):
            raise MalformedDocumentError("Can not return full revocation document created from inline")

        raw = self.raw()
        signed = "\n".join(self.signatures)
        signed_raw = raw + signed + "\n"
        return signed_raw
631237
def fetch(self):
        
        params = values.of({})

        payload = self._version.fetch(
            'GET',
            self._uri,
            params=params,
        )

        return DocumentPermissionInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            document_sid=self._solution['document_sid'],
            identity=self._solution['identity'],
        )
41797
private static function getReader(): Reader
    {
        if (self::$annotationReader === null) {
            self::$annotationReader = AspectKernel::getInstance()->getContainer()->get('aspect.annotation.reader');
        }

        return self::$annotationReader;
    }
142499
@Override
    public ResourceSet<Transcription> read(final TwilioRestClient client) {
        return new ResourceSet<>(this, client, firstPage(client));
    }
195664
def _get_web_auth_token(self):
        

        request = _Request(self.network, "auth.getToken")

        # default action is that a request is signed only when
        # a session key is provided.
        request.sign_it()

        doc = request.execute()

        e = doc.getElementsByTagName("token")[0]
        return e.firstChild.data
354582
def fetch(self):
        
        params = values.of({})

        payload = self._version.fetch(
            'GET',
            self._uri,
            params=params,
        )

        return UserBindingInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            user_sid=self._solution['user_sid'],
            sid=self._solution['sid'],
        )
155026
def _get_oath2_access_token(client_key, client_secret):
    '''
    

    '''
    if not client_key and not client_secret:
        log.error(
            "client_key and client_secret have not been specified "
            "and are required parameters."
        )
        return False

    method = 'POST'
    url = 'https://api.vistara.io/auth/oauth/token'
    headers = {
        'Content-Type': 'application/x-www-form-urlencoded',
        'Accept': 'application/json'
    }

    params = {
        'grant_type': 'client_credentials',
        'client_id': client_key,
        'client_secret': client_secret
    }

    resp = salt.utils.http.query(
        url=url,
        method=method,
        header_dict=headers,
        params=params,
        opts=__opts__
    )

    respbody = resp.get('body', None)

    if not respbody:
        return False

    access_token = salt.utils.json.loads(respbody)['access_token']
    return access_token
247041
def document(self):
        """"""
        resp = request.environ.get('pylons.original_response')
        page = error_document_template % \
            dict(prefix=request.environ.get('SCRIPT_NAME', ''),
                 code=request.params.get('code', resp.status_int),
                 message=request.params.get('message', resp.body))
        return page
307966
def to_header(self, realm=''):
        """"""
        oauth_params = ((k, v) for k, v in self.items() 
                            if k.startswith('oauth_'))
        stringy_params = ((k, escape(v)) for k, v in oauth_params)
        header_params = ('%s="%s"' % (k, v) for k, v in stringy_params)
        params_header = ', '.join(header_params)
 
        auth_header = 'OAuth realm="%s"' % realm
        if params_header:
            auth_header = "%s, %s" % (auth_header, params_header)
 
        return {'Authorization': auth_header}
486391
def to_document(self):
        
        return dict(
            info=thaw(self.info),
            paths=thaw(self.paths),
            definitions=thaw(self.definitions),
            securityDefinitions=thaw(self.securityDefinitions),
            security=thaw(self.security),
            swagger=thaw(self.swagger),
        )
1194708
private ServiceElement readService(String documentation) {
    String name = readName();
    ServiceElement.Builder builder = ServiceElement.builder()
        .name(name)
        .qualifiedName(prefix + name)
        .documentation(documentation);

    if (readChar() != '{') throw unexpected("expected '{'");
    while (true) {
      String rpcDocumentation = readDocumentation();
      if (peekChar() == '}') {
        pos++;
        break;
      }
      Object declared = readDeclaration(rpcDocumentation, Context.SERVICE);
      if (declared instanceof RpcElement) {
        builder.addRpc((RpcElement) declared);
      } else if (declared instanceof OptionElement) {
        builder.addOption((OptionElement) declared);
      }
    }
    return builder.build();
  }
603265
def getBinding(self):
        """"""
        wsdl = self.getService().getWSDL()
        return wsdl.bindings[self.binding]