Find SecurityPolicyUri of server's UserTokenPolicy by token_type. If SecurityPolicyUri is empty, use default SecurityPolicyUri of the endpoint
(self, token_type)
| 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 | """ |