I want to know how to authenticate Golang Restful API, but I don"t have a clue about it.
I want to know how to authenticate Golang Restful API, but I don"t have a clue about it.
middleware, is supported by many frameworks, and can also be natively implemented
restful can be thought of as an interface design style, but it is still a http request. The ajax interface of
website can also be designed in restful style, so directly use the same authentication method as the website, such as session.
if you follow the trend, you can also use token authentication methods such as jwt. If it is a pure API service for server access, you can also use a way that golang itself supports, such as basic auth.
your question is not easy to answer because you haven't made it clear what you want.
in general, token is used for authentication on all sides.