R
R
Roman Rakzin2015-07-14 17:37:25
go
Roman Rakzin, 2015-07-14 17:37:25

How to make a user authorization system in Golang?

Good afternoon. How to make a session and authorization system similar to php or some other on go ?
They write that there is almost nothing that could not be implemented in go. But I won’t do something with the usual authorization (((
I was here gorillatoolkit.org/pkg/sessions - if someone came across, are there any other articles on this topic? How do you differentiate rights and identify a user on go?
Thank you

Answer the question

In order to leave comments, you need to log in

3 answer(s)
F
FanKiLL, 2015-07-14
@FanKiLL

Make a label "authorizations" and write there when logging in, for example, a token of some kind, which you put in cookies for the user.
id | user_id | auth_token | date_login | user agent |
And then take cookies and check if there is authorization with such a token.

I
index0h, 2015-07-14
@index0h

https://github.com/avelino/awesome-go#authenticati...

V
valm0unt, 2015-07-15
@valm0unt

You can see it in this book: https://github.com/Unknwon/build-web-application-w...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question