def parseExtensionArgs(self, args, strict=False):
        """Parse the provider authentication policy arguments into the
        internal state of this object

        @param args: unqualified provider authentication policy
            arguments

        @param strict: Whether to raise an exception when bad data is
            encountered

        @returns: None. The data is parsed into the internal fields of
            this object.
        """
        policies_str = args.get('auth_policies')
        if policies_str:
            self.auth_policies = policies_str.split(' ')

        nist_level_str = args.get('nist_auth_level')
        if nist_level_str:
            try:
                nist_level = int(nist_level_str)
            except ValueError:
                if strict:
                    raise ValueError('nist_auth_level must be an integer between '
                                     'zero and four, inclusive')
                else:
                    self.nist_auth_level = None
            else:
                if 0 <= nist_level < 5:
                    self.nist_auth_level = nist_level

        auth_age_str = args.get('auth_age')
        if auth_age_str:
            try:
                auth_age = int(auth_age_str)
            except __HOLE__:
                if strict:
                    raise
            else:
                if auth_age >= 0:
                    self.auth_age = auth_age
                elif strict:
                    raise ValueError('Auth age must be above zero')
dataset/ETHPy150Open CollabQ/CollabQ/openid/extensions/pape.py/Response.parseExtensionArgs