# Authentifcation for REST Client

**URL:** <https://discuss.elastic.co/t/authentifcation-for-rest-client/136807>\
**Category:** Elasticsearch\
**Created:** [June 21, 2018, 8:59am UTC](https://discuss.elastic.co/t/authentifcation-for-rest-client/136807 "2018-06-21T08:59:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hichem\_Noomeni](https://avatars.discourse-cdn.com/v4/letter/h/e47774/32.png) [@Hichem\_Noomeni](https://discuss.elastic.co/u/Hichem_Noomeni)\
**Post date:** [June 21, 2018, 8:59am UTC](https://discuss.elastic.co/t/authentifcation-for-rest-client/136807/1 "2018-06-21T08:59:32Z")

</div>

Hello everyone,

I am using x\_pack security to secure my elasticsearch nodes. I am using a REST client via my java application to send REST request to elasticsearch server.  
But I didn't find any token based authentification documentation for REST client. I understood that authentification is only basic ( Base 64 encryption ) .

Is there please a way to authentifcate via JWT bearer tokens (for example) ?

Thank you all .

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [July 3, 2018, 8:38am UTC](https://discuss.elastic.co/t/authentifcation-for-rest-client/136807/2 "2018-07-03T08:38:17Z")

</div>

have you seen this page in our documentation? [https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/\_basic\_authentication.html](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/_basic_authentication.html)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 31, 2018, 8:38am UTC](https://discuss.elastic.co/t/authentifcation-for-rest-client/136807/3 "2018-07-31T08:38:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
