pysfemma.py
def ruleset_creation(self, myClaimType, rulesetFileName, entity):
        """
        Creates Service Provider ruleset file with NameID creation based on
        persistent-id by default
        """
        _eid = entity["entity_id"]
        try:
            # load template from configured file
            if self.is_persistent(_eid):
                ruleID = Template(open(self.ruleset_persistent, "r").read())
            else:
                ruleID = Template(open(self.ruleset_transient, "r").read())

            # susbstitutes rules and entityID
            outRuleset = ruleID.substitute(claimBaseType=myClaimType,
                                           spNameQualifier=_eid,
                                           nameQualifier=self.idp_entity_id)
            # create ruleset files
            rulesetFile = open(rulesetFileName, "w")
            rulesetFile.write(outRuleset)
            rulesetFile.write(self.get_rules(entity))
            rulesetFile.close()
        except Exception, e:
            print(e)
        return

        Creates Service Provider ruleset file with NameID creation based on
        persistent-id by default
        
Creates Service Provider ruleset file with NameID creation based on
persistent-id by default
Creates Service Provider ruleset file with NameID creation based on persistent - id by default
def ruleset_creation(self, myClaimType, rulesetFileName, entity):
        _eid = entity["entity_id"]
        try:
            if self.is_persistent(_eid):
                ruleID = Template(open(self.ruleset_persistent, "r").read())
            else:
                ruleID = Template(open(self.ruleset_transient, "r").read())
            outRuleset = ruleID.substitute(claimBaseType=myClaimType,
                                           spNameQualifier=_eid,
                                           nameQualifier=self.idp_entity_id)
            rulesetFile = open(rulesetFileName, "w")
            rulesetFile.write(outRuleset)
            rulesetFile.write(self.get_rules(entity))
            rulesetFile.close()
        except Exception, e:
            print(e)
        return
def ruleset_creation ( self , myClaimType , rulesetFileName , entity ) : _eid = entity [ "entity_id" ] try : if self . is_persistent ( _eid ) : ruleID = Template ( open ( self . ruleset_persistent , "r" ) . read ( ) ) else : ruleID = Template ( open ( self . ruleset_transient , "r" ) . read ( ) ) outRuleset = ruleID . substitute ( claimBaseType = myClaimType , spNameQualifier = _eid , nameQualifier = self . idp_entity_id ) rulesetFile = open ( rulesetFileName , "w" ) rulesetFile . write ( outRuleset ) rulesetFile . write ( self . get_rules ( entity ) ) rulesetFile . close ( ) except Exception , e : print ( e ) return
Creates Service Provider ruleset file with NameID creation based on
persistent-id by default
Creates Service Provider ruleset file with NameID creation based on persistent - id by default
"""
        Creates Service Provider ruleset file with NameID creation based on
        persistent-id by default
        """ # load template from configured file # susbstitutes rules and entityID # create ruleset files
self
myClaimType
rulesetFileName
entity