Skip to Content
Building RESTful Web services with Go
book

Building RESTful Web services with Go

by Naren Yellavula
December 2017
Intermediate to advanced
316 pages
6h 58m
English
Packt Publishing
Content preview from Building RESTful Web services with Go

Handling Authentication for Our REST Services

In this chapter, we are going to explore authentication patterns in Go. Those patterns are session-based authenticationJSON Web Tokens (JWT), and Open Authentication 2 (OAuth2). We will try to leverage the Gorilla package's sessions library to create basic sessions. Then, we will try to move onto advanced REST API authentication strategies such as using stateless JWT. Finally, we will see how to implement our own OAuth2 and also learn what packages are available to provide us out-of-box OAuth2 implementations. In the previous chapter, the API gateway implemented authentication (using plugins) for us. If the API gateway is not present in our architecture, how do we secure our API? You will find ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On RESTful Web Services with Go - Second Edition

Hands-On RESTful Web Services with Go - Second Edition

Naren Yellavula
Microservices with Go

Microservices with Go

Alexander Shuiskov

Publisher Resources

ISBN: 9781788294287Supplemental Content