1.3. 오프라인 토큰을 활성 상태로 유지
오프라인 토큰을 활성 상태로 유지하는 것은 사용자가 오프라인인 경우에도 애플리케이션이 사용자를 대신하여 작업을 수행해야 하는 경우에 유용합니다. 예를 들어 일상적인 데이터 백업이 있습니다.
오프라인 토큰은 비활성 후 30일 후에 만료됩니다. 오프라인 토큰을 주기적으로 새로 고침하여 오프라인 토큰이 만료되지 않도록 유지할 수 있습니다.
참고
오프라인 토큰이 만료되면 새 토큰을 요청해야 합니다.
다음 명령을 주기적으로 실행하여 토큰이 만료되지 않도록 합니다.
curl https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token -d grant_type=refresh_token -d client_id="cloud-services" -d refresh_token="{{ user_token }}" --fail --silent --show-error --output /dev/null