簡體   English   中英

如何自動驗證我的網絡服務?

[英]How to auto authenticate to my web-service?

我創建了一個簡單的 web 服務,它通過 API 提供一些數據。 我需要對 API 進行密碼保護,但它會導致對 API URL 的每個請求都提示一個身份驗證框(用戶名和密碼)。 我需要它是無縫的,有沒有辦法配置要在機器中配置的用戶名和密碼數據,以便在每個請求(即使是第一個請求)上自動驗證? 我正在使用 windows10,我的 web 服務是使用 Spring 和 Java 制作的。 謝謝;-)

In this case you might consider utilising the headers so that you provide your auth mechanism in there, I strongly suggest Spring security and JWT tokens, here is an example of securing your API with spring security and JWT ( https://medium.com/ @hantsy/protect-rest-apis-with-spring-security-and-jwt-5fbc90305cc5 )

在保護您的 api 時,有很多方法可以解決這個問題,請找到一些有用的鏈接

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM