OAuth 2.0 Cookbook Protect your web applications using Spring Security Adolfo Eloy Nascimento BIRMINGHAM - MUMBAI OAuth 2.0 Cookbook Copyright © 2017 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: October 2017 Production reference: 1161017 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78829-596-3 www.packtpub.com Credits Copy Editors Author Juliana Nair Adolfo Eloy Nascimento Stuti Srivastava Reviewer Project Coordinator Rafael Monteiro e Pereira Judie Jose Commissioning Editor Proofreader Vijin Boricha Safis Editing Acquisition Editor Indexer Rahul Nair Francy Puthiry Content Development Editor Graphics Nikita Pawar Kirk D'Penha Technical Editor Production Coordinator Prachi Sawant Nilesh Mohite About the Author Adolfo Eloy Nascimento is a software engineer at Elo7, he has a Bachelors degree in Computer Science, and has been working with software development since 1999. In around 2003, he started working with web development implementing applications using ASP, PHP4/5, JavaScript, and Java (sometimes he still does some maintenance for a Ruby on Rails application). He started using OAuth 2.0 two years ago, when designing applications using microservice architectures, as well as modeling and interacting with public APIs. As a tech enthusiast, Adolfo also likes to read and learn about programming languages and new technologies. He also believes that besides creating new applications, it is also important to share the knowledge he has acquired, which is what he does by writing for his personal blog, writing articles for Java Magazine in Brazil, and also writing tech books. I would like to thank Janine for all her support and understanding during the writing of this book. Without her support it wouldn't have been possible. In addition, I would like to thank my parents who gave me great support in education. I would also like to thank Rafael Monteiro for accepting the reviewing of this book and improving the quality of each chapter. Finally, I would like to thank the Packt team, especially Rahul and Nikita, for helping me during the whole process of writing this book.