import cyberwave.rest
from cyberwave.rest.models.password_change_schema import PasswordChangeSchema
from cyberwave.rest.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = cyberwave.rest.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: CustomTokenAuthentication
configuration.api_key['CustomTokenAuthentication'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CustomTokenAuthentication'] = 'Bearer'
# Enter a context with an instance of the API client
with cyberwave.rest.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cyberwave.rest.ProfileApi(api_client)
password_change_schema = cyberwave.rest.PasswordChangeSchema() # PasswordChangeSchema |
try:
# Change Password
api_instance.src_users_api_profile_change_password(password_change_schema)
except Exception as e:
print("Exception when calling ProfileApi->src_users_api_profile_change_password: %s\n" % e)