MCPcopy Create free account
hub / github.com/FreeOpcUa/python-opcua / server_policy_uri

Method server_policy_uri

opcua/client/client.py:423–435  ·  view source on GitHub ↗

Find SecurityPolicyUri of server's UserTokenPolicy by token_type. If SecurityPolicyUri is empty, use default SecurityPolicyUri of the endpoint

(self, token_type)

Source from the content-addressed store, hash-verified

421 return default
422
423 def server_policy_uri(self, token_type):
424 """
425 Find SecurityPolicyUri of server's UserTokenPolicy by token_type.
426 If SecurityPolicyUri is empty, use default SecurityPolicyUri
427 of the endpoint
428 """
429 for policy in self._policy_ids:
430 if policy.TokenType == token_type:
431 if policy.SecurityPolicyUri:
432 return policy.SecurityPolicyUri
433 else: # empty URI means "use this endpoint's policy URI"
434 return self.security_policy.URI
435 return self.security_policy.URI
436
437 def activate_session(self, username=None, password=None, certificate=None):
438 """

Callers 1

_add_user_authMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected