mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2025-04-06 10:50:31 -07:00
Merge pull request #251 from RanabirChakraborty/increase_access_token_lifespan
Access token lifespan is too short for ansible run
This commit is contained in:
commit
692fb59797
3 changed files with 18 additions and 1 deletions
|
@ -110,3 +110,6 @@
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: client
|
loop_var: client
|
||||||
when: "'users' in client"
|
when: "'users' in client"
|
||||||
|
|
||||||
|
- name: Provide Access token lifespan
|
||||||
|
ansible.builtin.include_tasks: manage_token_lifespan.yml
|
||||||
|
|
14
roles/keycloak_realm/tasks/manage_token_lifespan.yml
Normal file
14
roles/keycloak_realm/tasks/manage_token_lifespan.yml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
---
|
||||||
|
- name: "Update Access token lifespan"
|
||||||
|
ansible.builtin.uri:
|
||||||
|
url: "{{ keycloak_url }}{{ keycloak_context }}/admin/realms/{{ keycloak_realm }}"
|
||||||
|
method: PUT
|
||||||
|
body:
|
||||||
|
accessTokenLifespan: 300
|
||||||
|
validate_certs: false
|
||||||
|
body_format: json
|
||||||
|
status_code:
|
||||||
|
- 200
|
||||||
|
- 204
|
||||||
|
headers:
|
||||||
|
Authorization: "Bearer {{ keycloak_auth_response.json.access_token }}"
|
Loading…
Add table
Reference in a new issue