| Total Complexity | 3 |
| Total Lines | 17 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more |
||
| 20 | class AuthBaseAction(Action): |
||
| 21 | def __init__(self, config): |
||
| 22 | super(AuthBaseAction, self).__init__(config) |
||
| 23 | |||
| 24 | try: |
||
| 25 | self.ikey = self.config['auth_ikey'] |
||
| 26 | self.skey = self.config['auth_skey'] |
||
| 27 | self.host = self.config['auth_host'] |
||
| 28 | except KeyError: |
||
| 29 | raise ValueError("Duo config not found in config.") |
||
| 30 | |||
| 31 | self.duo_auth = duo_client.Auth(ikey=self.ikey, |
||
| 32 | skey=self.skey, |
||
| 33 | host=self.host) |
||
| 34 | |||
| 35 | def send_user_error(self, message): |
||
| 36 | print(message) |
||
| 37 |