mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Fixed it.
This commit is contained in:
parent
b0b295ba1e
commit
7ec56a56e5
@ -1,7 +1,7 @@
|
||||
from .plugin import CredentialPlugin
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from thycotic.secrets.server import SecretServer, PasswordGrantAuthorizer
|
||||
from thycotic.secrets.server import SecretServerV1 as SecretServer, PasswordGrantAuthorizer
|
||||
|
||||
tss_inputs = {
|
||||
'fields': [
|
||||
@ -30,7 +30,7 @@ tss_inputs = {
|
||||
'id': 'secret_id',
|
||||
'label': _('Secret ID'),
|
||||
'help_text': _('The integer ID of the secret'),
|
||||
'type': 'int',
|
||||
'type': 'string',
|
||||
},
|
||||
],
|
||||
'required': ['server_url', 'username', 'password', 'secret_id'],
|
||||
@ -40,6 +40,6 @@ tss_plugin = CredentialPlugin(
|
||||
'Thycotic Secret Server',
|
||||
tss_inputs,
|
||||
lambda **kwargs: SecretServer(
|
||||
PasswordGrantAuthorizer(**{k: v for (k, v) in kwargs.items() if k in [field['id'] for field in tss_inputs['fields']]})
|
||||
kwargs['server_url'], PasswordGrantAuthorizer(kwargs['server_url'].rstrip('/') + '/oauth2/token', kwargs['username'], kwargs['password'])
|
||||
).get_secret(kwargs['secret_id']),
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user