Allows for custom GrantedAuthoritys to be added to the current OAuth Principal. Multiple implementations
+ are allowed, by default OAuth scopes are converted to Authorities with the format SCOPE_<scope-name> and
+ if a `groups` claim exists in the access or id token, those are converted as well.
+
+ Example usage:
+
+
public staticorg.springframework.security.config.web.server.ServerHttpSecurityconfigureResourceServer401ResponseBody(org.springframework.security.config.web.server.ServerHttpSecurity http)
+
Configures the http to return a NON-EMPTY response body if the client supports the Media Type text/plain.
+ This is to work around an issue with Chrome, when a response body is empty, Chrome will show a `This site can’t be reached`, ERR_INVALID_RESPONSE error.
+ The body content will contain the HTTP Status and simple message such as `401 Unauthorized`.
+
+
Parameters:
+
http - the ServerHttpSecurity to configure
+
Returns:
+
the http to allow method chaining
+
+
+
+
+
+
configureResourceServer401ResponseBody
+
public staticorg.springframework.security.config.annotation.web.builders.HttpSecurityconfigureResourceServer401ResponseBody(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
+ throws Exception
+
Configures the http to return a NON-EMPTY response body if the client supports the Media Type text/plain.
+ This is to work around an issue with Chrome, when a response body is empty, Chrome will show a `This site can’t be reached`, ERR_INVALID_RESPONSE error.
+ The body content will contain the HTTP Status and simple message such as `401 Unauthorized`.
public class OktaEnvironmentPostProcessorApplicationListener
+extends Object
+implements org.springframework.context.event.SmartApplicationListener, org.springframework.core.Ordered
+
+
+
+
+
+
+
Field Summary
+
+
Fields inherited from interface org.springframework.core.Ordered
public class SpringCache<K,V>
+extends Object
+implements com.okta.sdk.cache.Cache<K,V>
+
A Okta SDK Cache implementation that wraps a Spring Cache instance.
+ This allows the Okta SDK to use your existing Spring caching mechanism so you only need to configure one
+ caching implementation.
+
+ This implementation effectively acts as an adapter or bridge from the Okta SDK cache API to the Spring cache API.
public class SpringCacheManager
+extends Object
+implements com.okta.sdk.cache.CacheManager, org.springframework.beans.factory.InitializingBean
+
A Okta SDK CacheManager implementation that wraps a Spring
+ CacheManager instance. This allows the Okta SDK to use your
+ existing Spring caching mechanism so you only need to configure one caching implementation.
+
+ This implementation effectively acts as an adapter or bridge from the Okta SDK cacheManager API to the Spring
+ CacheManager API.
Consults the wrapped Spring CacheManager instance to obtain a
+ named Spring Cache instance. The instance is wrapped and returned as a
+ SpringCache instance, which acts as a bridge/adapter over Spring's existing Cache API.
+
+
Specified by:
+
getCache in interface com.okta.sdk.cache.CacheManager
+
Type Parameters:
+
K - The cache key type
+
V - The cache value type
+
Parameters:
+
name - the name of the cache to acquire.
+
Returns:
+
the Cache with the given name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/3.0.5/apidocs/com/okta/spring/boot/sdk/cache/class-use/SpringCache.html b/3.0.5/apidocs/com/okta/spring/boot/sdk/cache/class-use/SpringCache.html
new file mode 100644
index 000000000..16bb8b848
--- /dev/null
+++ b/3.0.5/apidocs/com/okta/spring/boot/sdk/cache/class-use/SpringCache.html
@@ -0,0 +1,62 @@
+
+
+
+
+Uses of Class com.okta.spring.boot.sdk.cache.SpringCache (Okta Spring Boot 3.0.5 API)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Uses of Class com.okta.spring.boot.sdk.cache.SpringCache
+
+No usage of com.okta.spring.boot.sdk.cache.SpringCache
+
+
+
+
+
diff --git a/3.0.5/apidocs/com/okta/spring/boot/sdk/cache/class-use/SpringCacheManager.html b/3.0.5/apidocs/com/okta/spring/boot/sdk/cache/class-use/SpringCacheManager.html
new file mode 100644
index 000000000..0cc8c84d0
--- /dev/null
+++ b/3.0.5/apidocs/com/okta/spring/boot/sdk/cache/class-use/SpringCacheManager.html
@@ -0,0 +1,62 @@
+
+
+
+
+Uses of Class com.okta.spring.boot.sdk.cache.SpringCacheManager (Okta Spring Boot 3.0.5 API)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Uses of Class com.okta.spring.boot.sdk.cache.SpringCacheManager
+
+No usage of com.okta.spring.boot.sdk.cache.SpringCacheManager
+
+
Simple example REST endpoint that returns a static message. This controller also serves as an example for checking
+ an OAuth scope and client roles (parsed from an access token).
+
+
Returns:
+
a static welcome message
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/3.0.5/apidocs/com/okta/spring/example/controllers/class-use/LoginController.html b/3.0.5/apidocs/com/okta/spring/example/controllers/class-use/LoginController.html
new file mode 100644
index 000000000..48bbb09b2
--- /dev/null
+++ b/3.0.5/apidocs/com/okta/spring/example/controllers/class-use/LoginController.html
@@ -0,0 +1,62 @@
+
+
+
+
+Uses of Class com.okta.spring.example.controllers.LoginController (Okta Spring Boot 3.0.5 API)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Uses of Class com.okta.spring.example.controllers.LoginController
+
+No usage of com.okta.spring.example.controllers.LoginController
+
+
+
+
+
diff --git a/3.0.5/apidocs/com/okta/spring/example/controllers/class-use/SignInWidgetConfigController.WidgetConfig.html b/3.0.5/apidocs/com/okta/spring/example/controllers/class-use/SignInWidgetConfigController.WidgetConfig.html
new file mode 100644
index 000000000..0bc330a89
--- /dev/null
+++ b/3.0.5/apidocs/com/okta/spring/example/controllers/class-use/SignInWidgetConfigController.WidgetConfig.html
@@ -0,0 +1,87 @@
+
+
+
+
+Uses of Class com.okta.spring.example.controllers.SignInWidgetConfigController.WidgetConfig (Okta Spring Boot 3.0.5 API)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Uses of Class com.okta.spring.example.controllers.SignInWidgetConfigController.WidgetConfig
+Starting from the Overview page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page. The Index and Search box allow you to navigate to specific declarations and summary pages, including: All Packages, All Classes and Interfaces
+
+
Search
+
You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camelCase" abbreviations. For example:
+
+
j.l.obj will match "java.lang.Object"
+
InpStr will match "java.io.InputStream"
+
HM.cK will match "java.util.HashMap.containsKey(Object)"
+The following sections describe the different kinds of pages in this collection.
+
+
Overview
+
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
+
+
+
Package
+
Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:
+
+
Interfaces
+
Classes
+
Enums
+
Exceptions
+
Errors
+
Annotation Types
+
+
+
+
Class or Interface
+
Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.
+
+
Class Inheritance Diagram
+
Direct Subclasses
+
All Known Subinterfaces
+
All Known Implementing Classes
+
Class or Interface Declaration
+
Class or Interface Description
+
+
+
+
Nested Class Summary
+
Enum Constant Summary
+
Field Summary
+
Property Summary
+
Constructor Summary
+
Method Summary
+
Required Element Summary
+
Optional Element Summary
+
+
+
+
Enum Constant Details
+
Field Details
+
Property Details
+
Constructor Details
+
Method Details
+
Element Details
+
+
Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.
+
The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+
+
+
Other Files
+
Packages and modules may contain pages with additional information related to the declarations nearby.
+
+
+
Use
+
Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.
+
+
+
Tree (Class Hierarchy)
+
There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.
+
+
When viewing the Overview page, clicking on TREE displays the hierarchy for all packages.
+
When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
+
+
+
+
All Packages
+
The All Packages page contains an alphabetic index of all packages contained in the documentation.
+
+
+
All Classes and Interfaces
+
The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.
+
+
+
Index
+
The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.
+
+
+
+This help file applies to API documentation generated by the standard doclet.
+
+
+
+
diff --git a/3.0.5/apidocs/jquery-ui.overrides.css b/3.0.5/apidocs/jquery-ui.overrides.css
new file mode 100644
index 000000000..facf852c2
--- /dev/null
+++ b/3.0.5/apidocs/jquery-ui.overrides.css
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+.ui-state-active,
+.ui-widget-content .ui-state-active,
+.ui-widget-header .ui-state-active,
+a.ui-button:active,
+.ui-button:active,
+.ui-button.ui-state-active:hover {
+ /* Overrides the color of selection used in jQuery UI */
+ background: #F8981D;
+ border: 1px solid #F8981D;
+}
diff --git a/3.0.5/apidocs/legal/ADDITIONAL_LICENSE_INFO b/3.0.5/apidocs/legal/ADDITIONAL_LICENSE_INFO
new file mode 100644
index 000000000..ff700cd09
--- /dev/null
+++ b/3.0.5/apidocs/legal/ADDITIONAL_LICENSE_INFO
@@ -0,0 +1,37 @@
+ ADDITIONAL INFORMATION ABOUT LICENSING
+
+Certain files distributed by Oracle America, Inc. and/or its affiliates are
+subject to the following clarification and special exception to the GPLv2,
+based on the GNU Project exception for its Classpath libraries, known as the
+GNU Classpath Exception.
+
+Note that Oracle includes multiple, independent programs in this software
+package. Some of those programs are provided under licenses deemed
+incompatible with the GPLv2 by the Free Software Foundation and others.
+For example, the package includes programs licensed under the Apache
+License, Version 2.0 and may include FreeType. Such programs are licensed
+to you under their original licenses.
+
+Oracle facilitates your further distribution of this package by adding the
+Classpath Exception to the necessary parts of its GPLv2 code, which permits
+you to use that code in combination with other independent modules not
+licensed under the GPLv2. However, note that this would not permit you to
+commingle code under an incompatible license with Oracle's GPLv2 licensed
+code by, for example, cutting and pasting such code into a file also
+containing Oracle's GPLv2 licensed code and then distributing the result.
+
+Additionally, if you were to remove the Classpath Exception from any of the
+files to which it applies and distribute the result, you would likely be
+required to license some or all of the other code in that distribution under
+the GPLv2 as well, and since the GPLv2 is incompatible with the license terms
+of some items included in the distribution by Oracle, removing the Classpath
+Exception could therefore effectively compromise your ability to further
+distribute the package.
+
+Failing to distribute notices associated with some files may also create
+unexpected legal consequences.
+
+Proceed with caution and we recommend that you obtain the advice of a lawyer
+skilled in open source matters before removing the Classpath Exception or
+making modifications to this package which may subsequently be redistributed
+and/or involve the use of third party software.
diff --git a/3.0.5/apidocs/legal/ASSEMBLY_EXCEPTION b/3.0.5/apidocs/legal/ASSEMBLY_EXCEPTION
new file mode 100644
index 000000000..065b8d902
--- /dev/null
+++ b/3.0.5/apidocs/legal/ASSEMBLY_EXCEPTION
@@ -0,0 +1,27 @@
+
+OPENJDK ASSEMBLY EXCEPTION
+
+The OpenJDK source code made available by Oracle America, Inc. (Oracle) at
+openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU
+General Public License version 2
+only ("GPL2"), with the following clarification and special exception.
+
+ Linking this OpenJDK Code statically or dynamically with other code
+ is making a combined work based on this library. Thus, the terms
+ and conditions of GPL2 cover the whole combination.
+
+ As a special exception, Oracle gives you permission to link this
+ OpenJDK Code with certain code licensed by Oracle as indicated at
+ http://openjdk.java.net/legal/exception-modules-2007-05-08.html
+ ("Designated Exception Modules") to produce an executable,
+ regardless of the license terms of the Designated Exception Modules,
+ and to copy and distribute the resulting executable under GPL2,
+ provided that the Designated Exception Modules continue to be
+ governed by the licenses under which they were offered by Oracle.
+
+As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code
+to build an executable that includes those portions of necessary code that
+Oracle could not provide under GPL2 (or that Oracle has provided under GPL2
+with the Classpath exception). If you modify or add to the OpenJDK code,
+that new GPL2 code may still be combined with Designated Exception Modules
+if the new code is made subject to this exception by its copyright holder.
diff --git a/3.0.5/apidocs/legal/LICENSE b/3.0.5/apidocs/legal/LICENSE
new file mode 100644
index 000000000..8b400c7ab
--- /dev/null
+++ b/3.0.5/apidocs/legal/LICENSE
@@ -0,0 +1,347 @@
+The GNU General Public License (GPL)
+
+Version 2, June 1991
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Everyone is permitted to copy and distribute verbatim copies of this license
+document, but changing it is not allowed.
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to share
+and change it. By contrast, the GNU General Public License is intended to
+guarantee your freedom to share and change free software--to make sure the
+software is free for all its users. This General Public License applies to
+most of the Free Software Foundation's software and to any other program whose
+authors commit to using it. (Some other Free Software Foundation software is
+covered by the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+When we speak of free software, we are referring to freedom, not price. Our
+General Public Licenses are designed to make sure that you have the freedom to
+distribute copies of free software (and charge for this service if you wish),
+that you receive source code or can get it if you want it, that you can change
+the software or use pieces of it in new free programs; and that you know you
+can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to deny
+you these rights or to ask you to surrender the rights. These restrictions
+translate to certain responsibilities for you if you distribute copies of the
+software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether gratis or for
+a fee, you must give the recipients all the rights that you have. You must
+make sure that they, too, receive or can get the source code. And you must
+show them these terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the software, and (2)
+offer you this license which gives you legal permission to copy, distribute
+and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain that
+everyone understands that there is no warranty for this free software. If the
+software is modified by someone else and passed on, we want its recipients to
+know that what they have is not the original, so that any problems introduced
+by others will not reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software patents. We
+wish to avoid the danger that redistributors of a free program will
+individually obtain patent licenses, in effect making the program proprietary.
+To prevent this, we have made it clear that any patent must be licensed for
+everyone's free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and modification
+follow.
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+0. This License applies to any program or other work which contains a notice
+placed by the copyright holder saying it may be distributed under the terms of
+this General Public License. The "Program", below, refers to any such program
+or work, and a "work based on the Program" means either the Program or any
+derivative work under copyright law: that is to say, a work containing the
+Program or a portion of it, either verbatim or with modifications and/or
+translated into another language. (Hereinafter, translation is included
+without limitation in the term "modification".) Each licensee is addressed as
+"you".
+
+Activities other than copying, distribution and modification are not covered by
+this License; they are outside its scope. The act of running the Program is
+not restricted, and the output from the Program is covered only if its contents
+constitute a work based on the Program (independent of having been made by
+running the Program). Whether that is true depends on what the Program does.
+
+1. You may copy and distribute verbatim copies of the Program's source code as
+you receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice and
+disclaimer of warranty; keep intact all the notices that refer to this License
+and to the absence of any warranty; and give any other recipients of the
+Program a copy of this License along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and you may
+at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Program or any portion of it, thus
+forming a work based on the Program, and copy and distribute such modifications
+or work under the terms of Section 1 above, provided that you also meet all of
+these conditions:
+
+ a) You must cause the modified files to carry prominent notices stating
+ that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in whole or
+ in part contains or is derived from the Program or any part thereof, to be
+ licensed as a whole at no charge to all third parties under the terms of
+ this License.
+
+ c) If the modified program normally reads commands interactively when run,
+ you must cause it, when started running for such interactive use in the
+ most ordinary way, to print or display an announcement including an
+ appropriate copyright notice and a notice that there is no warranty (or
+ else, saying that you provide a warranty) and that users may redistribute
+ the program under these conditions, and telling the user how to view a copy
+ of this License. (Exception: if the Program itself is interactive but does
+ not normally print such an announcement, your work based on the Program is
+ not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If identifiable
+sections of that work are not derived from the Program, and can be reasonably
+considered independent and separate works in themselves, then this License, and
+its terms, do not apply to those sections when you distribute them as separate
+works. But when you distribute the same sections as part of a whole which is a
+work based on the Program, the distribution of the whole must be on the terms
+of this License, whose permissions for other licensees extend to the entire
+whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your
+rights to work written entirely by you; rather, the intent is to exercise the
+right to control the distribution of derivative or collective works based on
+the Program.
+
+In addition, mere aggregation of another work not based on the Program with the
+Program (or with a work based on the Program) on a volume of a storage or
+distribution medium does not bring the other work under the scope of this
+License.
+
+3. You may copy and distribute the Program (or a work based on it, under
+Section 2) in object code or executable form under the terms of Sections 1 and
+2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable source
+ code, which must be distributed under the terms of Sections 1 and 2 above
+ on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three years, to
+ give any third party, for a charge no more than your cost of physically
+ performing source distribution, a complete machine-readable copy of the
+ corresponding source code, to be distributed under the terms of Sections 1
+ and 2 above on a medium customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer to
+ distribute corresponding source code. (This alternative is allowed only
+ for noncommercial distribution and only if you received the program in
+ object code or executable form with such an offer, in accord with
+ Subsection b above.)
+
+The source code for a work means the preferred form of the work for making
+modifications to it. For an executable work, complete source code means all
+the source code for all modules it contains, plus any associated interface
+definition files, plus the scripts used to control compilation and installation
+of the executable. However, as a special exception, the source code
+distributed need not include anything that is normally distributed (in either
+source or binary form) with the major components (compiler, kernel, and so on)
+of the operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the source
+code from the same place counts as distribution of the source code, even though
+third parties are not compelled to copy the source along with the object code.
+
+4. You may not copy, modify, sublicense, or distribute the Program except as
+expressly provided under this License. Any attempt otherwise to copy, modify,
+sublicense or distribute the Program is void, and will automatically terminate
+your rights under this License. However, parties who have received copies, or
+rights, from you under this License will not have their licenses terminated so
+long as such parties remain in full compliance.
+
+5. You are not required to accept this License, since you have not signed it.
+However, nothing else grants you permission to modify or distribute the Program
+or its derivative works. These actions are prohibited by law if you do not
+accept this License. Therefore, by modifying or distributing the Program (or
+any work based on the Program), you indicate your acceptance of this License to
+do so, and all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+6. Each time you redistribute the Program (or any work based on the Program),
+the recipient automatically receives a license from the original licensor to
+copy, distribute or modify the Program subject to these terms and conditions.
+You may not impose any further restrictions on the recipients' exercise of the
+rights granted herein. You are not responsible for enforcing compliance by
+third parties to this License.
+
+7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues), conditions
+are imposed on you (whether by court order, agreement or otherwise) that
+contradict the conditions of this License, they do not excuse you from the
+conditions of this License. If you cannot distribute so as to satisfy
+simultaneously your obligations under this License and any other pertinent
+obligations, then as a consequence you may not distribute the Program at all.
+For example, if a patent license would not permit royalty-free redistribution
+of the Program by all those who receive copies directly or indirectly through
+you, then the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply and
+the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or
+other property right claims or to contest validity of any such claims; this
+section has the sole purpose of protecting the integrity of the free software
+distribution system, which is implemented by public license practices. Many
+people have made generous contributions to the wide range of software
+distributed through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing to
+distribute software through any other system and a licensee cannot impose that
+choice.
+
+This section is intended to make thoroughly clear what is believed to be a
+consequence of the rest of this License.
+
+8. If the distribution and/or use of the Program is restricted in certain
+countries either by patents or by copyrighted interfaces, the original
+copyright holder who places the Program under this License may add an explicit
+geographical distribution limitation excluding those countries, so that
+distribution is permitted only in or among countries not thus excluded. In
+such case, this License incorporates the limitation as if written in the body
+of this License.
+
+9. The Free Software Foundation may publish revised and/or new versions of the
+General Public License from time to time. Such new versions will be similar in
+spirit to the present version, but may differ in detail to address new problems
+or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any later
+version", you have the option of following the terms and conditions either of
+that version or of any later version published by the Free Software Foundation.
+If the Program does not specify a version number of this License, you may
+choose any version ever published by the Free Software Foundation.
+
+10. If you wish to incorporate parts of the Program into other free programs
+whose distribution conditions are different, write to the author to ask for
+permission. For software which is copyrighted by the Free Software Foundation,
+write to the Free Software Foundation; we sometimes make exceptions for this.
+Our decision will be guided by the two goals of preserving the free status of
+all derivatives of our free software and of promoting the sharing and reuse of
+software generally.
+
+NO WARRANTY
+
+11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
+THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
+STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
+PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
+PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
+YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
+ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
+PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
+INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
+BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
+OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest possible
+use to the public, the best way to achieve this is to make it free software
+which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program. It is safest to attach
+them to the start of each source file to most effectively convey the exclusion
+of warranty; and each file should have at least the "copyright" line and a
+pointer to where the full notice is found.
+
+ One line to give the program's name and a brief idea of what it does.
+
+ Copyright (C)
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this when it
+starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
+ with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free
+ software, and you are welcome to redistribute it under certain conditions;
+ type 'show c' for details.
+
+The hypothetical commands 'show w' and 'show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may be
+called something other than 'show w' and 'show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your school,
+if any, to sign a "copyright disclaimer" for the program, if necessary. Here
+is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ 'Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ signature of Ty Coon, 1 April 1989
+
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General Public
+License instead of this License.
+
+
+"CLASSPATH" EXCEPTION TO THE GPL
+
+Certain source files distributed by Oracle America and/or its affiliates are
+subject to the following clarification and special exception to the GPL, but
+only where Oracle has expressly included in the particular source file's header
+the words "Oracle designates this particular file as subject to the "Classpath"
+exception as provided by Oracle in the LICENSE file that accompanied this code."
+
+ Linking this library statically or dynamically with other modules is making
+ a combined work based on this library. Thus, the terms and conditions of
+ the GNU General Public License cover the whole combination.
+
+ As a special exception, the copyright holders of this library give you
+ permission to link this library with independent modules to produce an
+ executable, regardless of the license terms of these independent modules,
+ and to copy and distribute the resulting executable under terms of your
+ choice, provided that you also meet, for each linked independent module,
+ the terms and conditions of the license of that module. An independent
+ module is a module which is not derived from or based on this library. If
+ you modify this library, you may extend this exception to your version of
+ the library, but you are not obligated to do so. If you do not wish to do
+ so, delete this exception statement from your version.
diff --git a/3.0.5/apidocs/legal/jquery.md b/3.0.5/apidocs/legal/jquery.md
new file mode 100644
index 000000000..f7b72e3fb
--- /dev/null
+++ b/3.0.5/apidocs/legal/jquery.md
@@ -0,0 +1,72 @@
+## jQuery v3.6.0
+
+### jQuery License
+```
+jQuery v 3.6.0
+Copyright OpenJS Foundation and other contributors, https://openjsf.org/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+******************************************
+
+The jQuery JavaScript Library v3.6.0 also includes Sizzle.js
+
+Sizzle.js includes the following license:
+
+Copyright JS Foundation and other contributors, https://js.foundation/
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/jquery/sizzle
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+All files located in the node_modules and external directories are
+externally maintained libraries used by this software which have their
+own licenses; we recommend you read them, as their terms may differ from
+the terms above.
+
+*********************
+
+```
diff --git a/3.0.5/apidocs/legal/jqueryUI.md b/3.0.5/apidocs/legal/jqueryUI.md
new file mode 100644
index 000000000..8031bdb56
--- /dev/null
+++ b/3.0.5/apidocs/legal/jqueryUI.md
@@ -0,0 +1,49 @@
+## jQuery UI v1.12.1
+
+### jQuery UI License
+```
+Copyright jQuery Foundation and other contributors, https://jquery.org/
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/jquery/jquery-ui
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code contained within the demos directory.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+All files located in the node_modules and external directories are
+externally maintained libraries used by this software which have their
+own licenses; we recommend you read them, as their terms may differ from
+the terms above.
+
+```
diff --git a/3.0.5/apidocs/member-search-index.js b/3.0.5/apidocs/member-search-index.js
new file mode 100644
index 000000000..93ffb1388
--- /dev/null
+++ b/3.0.5/apidocs/member-search-index.js
@@ -0,0 +1 @@
+memberSearchIndex = [{"p":"com.okta.spring.boot.sdk.cache","c":"SpringCacheManager","l":"afterPropertiesSet()"},{"p":"com.okta.spring.boot.oauth.http","c":"Auth0ClientRequestInterceptor","l":"Auth0ClientRequestInterceptor()","u":"%3Cinit%3E()"},{"p":"com.okta.spring.example.controllers","c":"SignInWidgetConfigController.WidgetConfig","l":"authParams"},{"p":"com.okta.spring.example.controllers","c":"SignInWidgetConfigController.WidgetConfig","l":"baseUrl"},{"p":"com.okta.spring.tests.common.servlet.jwt","c":"BasicJwtResourceServerApplication","l":"BasicJwtResourceServerApplication()","u":"%3Cinit%3E()"},{"p":"com.okta.spring.tests.common.servlet.opaquetoken","c":"BasicOpaqueTokenResourceServerApplication","l":"BasicOpaqueTokenResourceServerApplication()","u":"%3Cinit%3E()"},{"p":"com.okta.spring.tests.common.servlet.code","c":"BasicRedirectCodeFlowApplication","l":"BasicRedirectCodeFlowApplication()","u":"%3Cinit%3E()"},{"p":"com.okta.spring.example.controllers","c":"SignInWidgetConfigController.WidgetConfig","l":"clientId"},{"p":"com.okta.spring.boot.sdk.config","c":"OktaClientProperties.ClientProxyInfo","l":"ClientProxyInfo()","u":"%3Cinit%3E()"},{"p":"com.okta.example.cloud.configserver","c":"ConfigServerApplication","l":"ConfigServerApplication()","u":"%3Cinit%3E()"},{"p":"com.okta.spring.boot.oauth","c":"Okta","l":"configureOAuth2WithPkce(HttpSecurity, ClientRegistrationRepository)","u":"configureOAuth2WithPkce(org.springframework.security.config.annotation.web.builders.HttpSecurity,org.springframework.security.oauth2.client.registration.ClientRegistrationRepository)"},{"p":"com.okta.spring.boot.oauth","c":"Okta","l":"configureOAuth2WithPkce(ServerHttpSecurity, ReactiveClientRegistrationRepository)","u":"configureOAuth2WithPkce(org.springframework.security.config.web.server.ServerHttpSecurity,org.springframework.security.oauth2.client.registration.ReactiveClientRegistrationRepository)"},{"p":"com.okta.spring.boot.oauth","c":"Okta","l":"configureResourceServer401ResponseBody(HttpSecurity)","u":"configureResourceServer401ResponseBody(org.springframework.security.config.annotation.web.builders.HttpSecurity)"},{"p":"com.okta.spring.boot.oauth","c":"Okta","l":"configureResourceServer401ResponseBody(ServerHttpSecurity)","u":"configureResourceServer401ResponseBody(org.springframework.security.config.web.server.ServerHttpSecurity)"},{"p":"com.okta.spring.tests.common.reactive.code","c":"ReactiveRedirectCodeFlowApplication","l":"everyoneAccess(Principal)","u":"everyoneAccess(java.security.Principal)"},{"p":"com.okta.spring.tests.common.reactive.implicit","c":"ReactiveImplicitFlowApplication.MessageOfTheDayController","l":"everyoneAccess(Principal)","u":"everyoneAccess(java.security.Principal)"},{"p":"com.okta.spring.tests.common.servlet.code","c":"BasicRedirectCodeFlowApplication","l":"everyoneAccess(Principal)","u":"everyoneAccess(java.security.Principal)"},{"p":"com.okta.spring.tests.common.servlet.jwt","c":"BasicJwtResourceServerApplication.MessageOfTheDayController","l":"everyoneAccess(Principal)","u":"everyoneAccess(java.security.Principal)"},{"p":"com.okta.spring.tests.common.servlet.opaquetoken","c":"BasicOpaqueTokenResourceServerApplication.MessageOfTheDayController","l":"everyoneAccess(Principal)","u":"everyoneAccess(java.security.Principal)"},{"p":"com.okta.spring.boot.sdk.cache","c":"SpringCache","l":"get(K)"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"getAudience()"},{"p":"com.okta.spring.boot.oauth","c":"AuthoritiesProvider","l":"getAuthorities(OAuth2User, OAuth2UserRequest)","u":"getAuthorities(org.springframework.security.oauth2.core.user.OAuth2User,org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest)"},{"p":"com.okta.spring.boot.oauth","c":"AuthoritiesProvider","l":"getAuthorities(OidcUser, OidcUserRequest)","u":"getAuthorities(org.springframework.security.oauth2.core.oidc.user.OidcUser,org.springframework.security.oauth2.client.oidc.userinfo.OidcUserRequest)"},{"p":"com.okta.spring.boot.oauth.env","c":"OIDCMetadata","l":"getAuthorizationURI()"},{"p":"com.okta.spring.boot.sdk.cache","c":"SpringCacheManager","l":"getCache(String)","u":"getCache(java.lang.String)"},{"p":"com.okta.spring.boot.oauth.env","c":"OIDCMetadata","l":"getClientAuthenticationMethod()"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"getClientId()"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"getClientSecret()"},{"p":"com.okta.spring.boot.sdk.config","c":"OktaClientProperties","l":"getConnectionTimeout()"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"getGroupsClaim()"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties.Proxy","l":"getHost()"},{"p":"com.okta.spring.boot.sdk.config","c":"OktaClientProperties.ClientProxyInfo","l":"getHostname()"},{"p":"com.okta.spring.boot.oauth.env","c":"OIDCMetadata","l":"getIntrospectionURI()"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"getIssuer()"},{"p":"com.okta.spring.boot.oauth.env","c":"OIDCMetadata","l":"getJwkSetURI()"},{"p":"com.okta.spring.example.controllers","c":"WelcomeController","l":"getMessageOfTheDay(Principal)","u":"getMessageOfTheDay(java.security.Principal)"},{"p":"com.okta.spring.tests.common.reactive.code","c":"ReactiveRedirectCodeFlowApplication","l":"getMessageOfTheDay(Principal)","u":"getMessageOfTheDay(java.security.Principal)"},{"p":"com.okta.spring.tests.common.reactive.implicit","c":"ReactiveImplicitFlowApplication.MessageOfTheDayController","l":"getMessageOfTheDay(Principal)","u":"getMessageOfTheDay(java.security.Principal)"},{"p":"com.okta.spring.tests.common.servlet.code","c":"BasicRedirectCodeFlowApplication","l":"getMessageOfTheDay(Principal)","u":"getMessageOfTheDay(java.security.Principal)"},{"p":"com.okta.spring.tests.common.servlet.jwt","c":"BasicJwtResourceServerApplication.MessageOfTheDayController","l":"getMessageOfTheDay(Principal)","u":"getMessageOfTheDay(java.security.Principal)"},{"p":"com.okta.spring.tests.common.servlet.opaquetoken","c":"BasicOpaqueTokenResourceServerApplication.MessageOfTheDayController","l":"getMessageOfTheDay(Principal)","u":"getMessageOfTheDay(java.security.Principal)"},{"p":"com.okta.spring.boot.oauth.env","c":"OktaEnvironmentPostProcessorApplicationListener","l":"getOrder()"},{"p":"com.okta.spring.boot.sdk.config","c":"OktaClientProperties","l":"getOrgUrl()"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties.Proxy","l":"getPassword()"},{"p":"com.okta.spring.boot.sdk.config","c":"OktaClientProperties.ClientProxyInfo","l":"getPassword()"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties.Proxy","l":"getPort()"},{"p":"com.okta.spring.boot.sdk.config","c":"OktaClientProperties.ClientProxyInfo","l":"getPort()"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"getPostLogoutRedirectUri()"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"getProxy()"},{"p":"com.okta.spring.boot.sdk.config","c":"OktaClientProperties","l":"getProxy()"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"getRedirectUri()"},{"p":"com.okta.spring.boot.oauth.env","c":"OIDCMetadata","l":"getScope()"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"getScopes()"},{"p":"com.okta.spring.boot.sdk.config","c":"OktaClientProperties","l":"getToken()"},{"p":"com.okta.spring.boot.oauth.env","c":"OIDCMetadata","l":"getTokenURI()"},{"p":"com.okta.spring.tests.common.reactive.implicit","c":"ReactiveImplicitFlowApplication.MessageOfTheDayController","l":"getUserDetails(Authentication)","u":"getUserDetails(org.springframework.security.core.Authentication)"},{"p":"com.okta.spring.tests.common.servlet.jwt","c":"BasicJwtResourceServerApplication.MessageOfTheDayController","l":"getUserDetails(Authentication)","u":"getUserDetails(org.springframework.security.core.Authentication)"},{"p":"com.okta.spring.tests.common.servlet.opaquetoken","c":"BasicOpaqueTokenResourceServerApplication.MessageOfTheDayController","l":"getUserDetails(Authentication)","u":"getUserDetails(org.springframework.security.core.Authentication)"},{"p":"com.okta.spring.boot.oauth.env","c":"OIDCMetadata","l":"getUserInfoURI()"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties.Proxy","l":"getUsername()"},{"p":"com.okta.spring.boot.sdk.config","c":"OktaClientProperties.ClientProxyInfo","l":"getUsername()"},{"p":"com.okta.spring.example.controllers","c":"SignInWidgetConfigController","l":"getWidgetConfig()"},{"p":"com.okta.spring.example","c":"HostedLoginCodeFlowExampleApplication","l":"HostedLoginCodeFlowExampleApplication()","u":"%3Cinit%3E()"},{"p":"com.okta.spring.example","c":"ImplicitFlowApplication","l":"ImplicitFlowApplication()","u":"%3Cinit%3E()"},{"p":"com.okta.spring.boot.oauth.http","c":"Auth0ClientRequestInterceptor","l":"intercept(HttpRequest, byte[], ClientHttpRequestExecution)","u":"intercept(org.springframework.http.HttpRequest,byte[],org.springframework.http.client.ClientHttpRequestExecution)"},{"p":"com.okta.spring.boot.oauth.http","c":"UserAgentRequestInterceptor","l":"intercept(HttpRequest, byte[], ClientHttpRequestExecution)","u":"intercept(org.springframework.http.HttpRequest,byte[],org.springframework.http.client.ClientHttpRequestExecution)"},{"p":"com.okta.spring.tests.common.reactive.code","c":"ReactiveRedirectCodeFlowApplication","l":"invalidGroup()"},{"p":"com.okta.spring.tests.common.servlet.code","c":"BasicRedirectCodeFlowApplication","l":"invalidGroup()"},{"p":"com.okta.spring.tests.common.servlet.opaquetoken","c":"BasicOpaqueTokenResourceServerApplication.MessageOfTheDayController","l":"invalidScope()"},{"p":"com.okta.spring.boot.oauth.env","c":"OIDCMetadata","l":"isAuth0()"},{"p":"com.okta.spring.example.controllers","c":"LoginController","l":"login(String)","u":"login(java.lang.String)"},{"p":"com.okta.spring.example.controllers","c":"LoginController","l":"LoginController(OktaOAuth2Properties)","u":"%3Cinit%3E(com.okta.spring.boot.oauth.config.OktaOAuth2Properties)"},{"p":"com.okta.example.cloud.configserver","c":"ConfigServerApplication","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"com.okta.spring.example","c":"HostedLoginCodeFlowExampleApplication","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"com.okta.spring.example","c":"ImplicitFlowApplication","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"com.okta.spring.example","c":"RedirectCodeFlowApplication","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"com.okta.spring.example.webflux","c":"ReactiveApplication","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"com.okta.spring.tests.common.reactive.code","c":"ReactiveRedirectCodeFlowApplication","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"com.okta.spring.tests.common.reactive.implicit","c":"ReactiveImplicitFlowApplication","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"com.okta.spring.tests.common.servlet.code","c":"BasicRedirectCodeFlowApplication","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"com.okta.spring.tests.common.servlet.jwt","c":"BasicJwtResourceServerApplication","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"com.okta.spring.tests.common.servlet.opaquetoken","c":"BasicOpaqueTokenResourceServerApplication","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"com.okta.spring.example.controllers","c":"WelcomeController.Welcome","l":"messageOfTheDay"},{"p":"com.okta.spring.tests.common.reactive.implicit","c":"ReactiveImplicitFlowApplication.MessageOfTheDayController","l":"MessageOfTheDayController()","u":"%3Cinit%3E()"},{"p":"com.okta.spring.tests.common.servlet.jwt","c":"BasicJwtResourceServerApplication.MessageOfTheDayController","l":"MessageOfTheDayController()","u":"%3Cinit%3E()"},{"p":"com.okta.spring.tests.common.servlet.opaquetoken","c":"BasicOpaqueTokenResourceServerApplication.MessageOfTheDayController","l":"MessageOfTheDayController()","u":"%3Cinit%3E()"},{"p":"com.okta.spring.tests.common.reactive.implicit","c":"ReactiveImplicitFlowApplication.MessageOfTheDayController","l":"messages()"},{"p":"com.okta.spring.tests.common.servlet.jwt","c":"BasicJwtResourceServerApplication.MessageOfTheDayController","l":"messages()"},{"p":"com.okta.spring.tests.common.servlet.opaquetoken","c":"BasicOpaqueTokenResourceServerApplication.MessageOfTheDayController","l":"messages()"},{"p":"com.okta.spring.boot.oauth.env","c":"OIDCMetadata","l":"OIDCMetadata(ResponseEntity)","u":"%3Cinit%3E(org.springframework.http.ResponseEntity)"},{"p":"com.okta.spring.boot.oauth.env","c":"OIDCMetadata","l":"OIDCMetadata(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.okta.spring.boot.sdk.config","c":"OktaClientProperties","l":"OktaClientProperties()","u":"%3Cinit%3E()"},{"p":"com.okta.spring.boot.oauth.env","c":"OktaEnvironmentPostProcessorApplicationListener","l":"OktaEnvironmentPostProcessorApplicationListener()","u":"%3Cinit%3E()"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"OktaOAuth2Properties(OAuth2ClientProperties)","u":"%3Cinit%3E(org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientProperties)"},{"p":"com.okta.spring.boot.sdk","c":"OktaSdkConfig","l":"oktaSdkClient()"},{"p":"com.okta.spring.boot.sdk","c":"OktaSdkConfig","l":"oktaSdkClientCredentials()"},{"p":"com.okta.spring.boot.sdk","c":"OktaSdkConfig","l":"OktaSdkConfig(OktaClientProperties, CacheManager)","u":"%3Cinit%3E(com.okta.spring.boot.sdk.config.OktaClientProperties,org.springframework.cache.CacheManager)"},{"p":"com.okta.spring.boot.oauth.env","c":"OktaEnvironmentPostProcessorApplicationListener","l":"onApplicationEvent(ApplicationEvent)","u":"onApplicationEvent(org.springframework.context.ApplicationEvent)"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties.Proxy","l":"Proxy()","u":"%3Cinit%3E()"},{"p":"com.okta.spring.boot.sdk.cache","c":"SpringCache","l":"put(K, V)","u":"put(K,V)"},{"p":"com.okta.spring.example.webflux","c":"ReactiveApplication","l":"ReactiveApplication()","u":"%3Cinit%3E()"},{"p":"com.okta.spring.tests.common.reactive.implicit","c":"ReactiveImplicitFlowApplication","l":"ReactiveImplicitFlowApplication()","u":"%3Cinit%3E()"},{"p":"com.okta.spring.tests.common.reactive.code","c":"ReactiveRedirectCodeFlowApplication","l":"ReactiveRedirectCodeFlowApplication()","u":"%3Cinit%3E()"},{"p":"com.okta.spring.example","c":"RedirectCodeFlowApplication","l":"RedirectCodeFlowApplication()","u":"%3Cinit%3E()"},{"p":"com.okta.spring.boot.sdk.cache","c":"SpringCache","l":"remove(K)"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"setAudience(String)","u":"setAudience(java.lang.String)"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"setClientId(String)","u":"setClientId(java.lang.String)"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"setClientSecret(String)","u":"setClientSecret(java.lang.String)"},{"p":"com.okta.spring.boot.sdk.config","c":"OktaClientProperties","l":"setConnectionTimeout(int)"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"setGroupsClaim(String)","u":"setGroupsClaim(java.lang.String)"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties.Proxy","l":"setHost(String)","u":"setHost(java.lang.String)"},{"p":"com.okta.spring.boot.sdk.config","c":"OktaClientProperties.ClientProxyInfo","l":"setHostname(String)","u":"setHostname(java.lang.String)"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"setIssuer(String)","u":"setIssuer(java.lang.String)"},{"p":"com.okta.spring.boot.sdk.config","c":"OktaClientProperties","l":"setOrgUrl(String)","u":"setOrgUrl(java.lang.String)"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties.Proxy","l":"setPassword(String)","u":"setPassword(java.lang.String)"},{"p":"com.okta.spring.boot.sdk.config","c":"OktaClientProperties.ClientProxyInfo","l":"setPassword(String)","u":"setPassword(java.lang.String)"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties.Proxy","l":"setPort(int)"},{"p":"com.okta.spring.boot.sdk.config","c":"OktaClientProperties.ClientProxyInfo","l":"setPort(int)"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"setPostLogoutRedirectUri(String)","u":"setPostLogoutRedirectUri(java.lang.String)"},{"p":"com.okta.spring.boot.sdk.config","c":"OktaClientProperties","l":"setProxy(OktaClientProperties.ClientProxyInfo)","u":"setProxy(com.okta.spring.boot.sdk.config.OktaClientProperties.ClientProxyInfo)"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"setProxy(OktaOAuth2Properties.Proxy)","u":"setProxy(com.okta.spring.boot.oauth.config.OktaOAuth2Properties.Proxy)"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"setRedirectUri(String)","u":"setRedirectUri(java.lang.String)"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"setScopes(Set)","u":"setScopes(java.util.Set)"},{"p":"com.okta.spring.boot.sdk.cache","c":"SpringCacheManager","l":"setSpringCacheManager(CacheManager)","u":"setSpringCacheManager(org.springframework.cache.CacheManager)"},{"p":"com.okta.spring.boot.sdk.config","c":"OktaClientProperties","l":"setToken(String)","u":"setToken(java.lang.String)"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties.Proxy","l":"setUsername(String)","u":"setUsername(java.lang.String)"},{"p":"com.okta.spring.boot.sdk.config","c":"OktaClientProperties.ClientProxyInfo","l":"setUsername(String)","u":"setUsername(java.lang.String)"},{"p":"com.okta.spring.example.controllers","c":"SignInWidgetConfigController","l":"SignInWidgetConfigController(String, String)","u":"%3Cinit%3E(java.lang.String,java.lang.String)"},{"p":"com.okta.spring.boot.sdk.cache","c":"SpringCache","l":"SpringCache(Cache)","u":"%3Cinit%3E(org.springframework.cache.Cache)"},{"p":"com.okta.spring.boot.sdk.cache","c":"SpringCacheManager","l":"SpringCacheManager()","u":"%3Cinit%3E()"},{"p":"com.okta.spring.boot.sdk.cache","c":"SpringCacheManager","l":"SpringCacheManager(CacheManager)","u":"%3Cinit%3E(org.springframework.cache.CacheManager)"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"supports(Class>)","u":"supports(java.lang.Class)"},{"p":"com.okta.spring.boot.oauth.env","c":"OktaEnvironmentPostProcessorApplicationListener","l":"supportsEventType(Class extends ApplicationEvent>)","u":"supportsEventType(java.lang.Class)"},{"p":"com.okta.spring.boot.oauth.http","c":"UserAgentRequestInterceptor","l":"UserAgentRequestInterceptor()","u":"%3Cinit%3E()"},{"p":"com.okta.spring.example.webflux","c":"ReactiveApplication","l":"userDetailsMono(Mono)","u":"userDetailsMono(reactor.core.publisher.Mono)"},{"p":"com.okta.spring.example.controllers","c":"WelcomeController.Welcome","l":"username"},{"p":"com.okta.spring.boot.oauth.config","c":"OktaOAuth2Properties","l":"validate(Object, Errors)","u":"validate(java.lang.Object,org.springframework.validation.Errors)"},{"p":"com.okta.spring.example.controllers","c":"WelcomeController.Welcome","l":"Welcome(String, String)","u":"%3Cinit%3E(java.lang.String,java.lang.String)"},{"p":"com.okta.spring.example.controllers","c":"WelcomeController","l":"WelcomeController()","u":"%3Cinit%3E()"},{"p":"com.okta.spring.example.controllers","c":"SignInWidgetConfigController.WidgetConfig","l":"WidgetConfig(String, String)","u":"%3Cinit%3E(java.lang.String,java.lang.String)"}];updateSearchResults();
\ No newline at end of file
diff --git a/3.0.5/apidocs/module-search-index.js b/3.0.5/apidocs/module-search-index.js
new file mode 100644
index 000000000..0d59754fc
--- /dev/null
+++ b/3.0.5/apidocs/module-search-index.js
@@ -0,0 +1 @@
+moduleSearchIndex = [];updateSearchResults();
\ No newline at end of file
diff --git a/3.0.5/apidocs/overview-summary.html b/3.0.5/apidocs/overview-summary.html
new file mode 100644
index 000000000..567bc9119
--- /dev/null
+++ b/3.0.5/apidocs/overview-summary.html
@@ -0,0 +1,26 @@
+
+
+
+
+Okta Spring Boot 3.0.5 API
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1/*
+2 * Copyright 2018-Present Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.example.cloud.configserver;
+17
+18import org.springframework.boot.SpringApplication;
+19import org.springframework.boot.autoconfigure.SpringBootApplication;
+20import org.springframework.cloud.config.server.EnableConfigServer;
+21
+22 @EnableConfigServer
+23 @SpringBootApplication
+24publicclassConfigServerApplication {
+25
+26publicstaticvoid main(String[] args) {
+27 SpringApplication.run(ConfigServerApplication.class, args);
+28 }
+29 }
+
+1/*
+2 * Copyright 2019-Present Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.boot.oauth;
+17
+18import org.springframework.security.core.GrantedAuthority;
+19import org.springframework.security.oauth2.client.oidc.userinfo.OidcUserRequest;
+20import org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest;
+21import org.springframework.security.oauth2.core.oidc.user.OidcUser;
+22import org.springframework.security.oauth2.core.user.OAuth2User;
+23
+24import java.util.Collection;
+25
+26/**
+27 * Allows for custom {@link GrantedAuthority}s to be added to the current OAuth Principal. Multiple implementations
+28 * are allowed, by default OAuth scopes are converted to Authorities with the format {@code SCOPE_<scope-name>} and
+29 * if a `groups` claim exists in the access or id token, those are converted as well.
+30 *
+31 * Example usage:
+32 *
+33 * <pre><code>
+34 * @Bean
+35 * AuthoritiesProvider myCustomAuthoritiesProvider() {
+36 * return (user, userRequest) -> lookupExtraAuthoritesByName(user.getAttributes().get("email"));
+37 * }
+38 * </code></pre>
+39 *
+40 * @since 1.4.0
+41 */
+42publicinterfaceAuthoritiesProvider {
+43
+44 Collection<? extends GrantedAuthority> getAuthorities(OAuth2User user, OAuth2UserRequest userRequest);
+45
+46default Collection<? extends GrantedAuthority> getAuthorities(OidcUser user, OidcUserRequest userRequest) {
+47return getAuthorities((OAuth2User) user, userRequest);
+48 }
+49 }
+
+1/*
+2 * Copyright 2019-Present Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.boot.oauth;
+17
+18import com.okta.spring.boot.oauth.config.OktaOAuth2Properties;
+19import org.springframework.context.annotation.Bean;
+20import org.springframework.context.annotation.Configuration;
+21
+22/**
+23 * @since 1.4.0
+24 */
+25 @Configuration
+26classAuthorityProvidersConfig {
+27
+28 @Bean
+29AuthoritiesProvider tokenScopesAuthoritiesProvider() {
+30return (user, userRequest) -> TokenUtil.tokenScopesToAuthorities(userRequest.getAccessToken());
+31 }
+32
+33 @Bean
+34AuthoritiesProvider groupClaimsAuthoritiesProvider(OktaOAuth2Properties oktaOAuth2Properties) {
+35return (user, userRequest) -> TokenUtil.tokenClaimsToAuthorities(user.getAttributes(), oktaOAuth2Properties.getGroupsClaim());
+36 }
+37 }
+
+1/*
+2 * Copyright 2018-Present Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.boot.oauth;
+17
+18import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+19import java.lang.annotation.ElementType;
+20import java.lang.annotation.Retention;
+21import java.lang.annotation.RetentionPolicy;
+22import java.lang.annotation.Target;
+23
+24 @Retention(RetentionPolicy.RUNTIME)
+25 @Target({ ElementType.TYPE, ElementType.METHOD })
+26 @ConditionalOnProperty(name = {"spring.security.oauth2.client.registration.okta.client-id"})
+27 @interface ConditionalOnOktaClientProperties {}
+
+1/*
+2 * Copyright 2018-Present Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.boot.oauth;
+17
+18import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+19
+20import java.lang.annotation.ElementType;
+21import java.lang.annotation.Retention;
+22import java.lang.annotation.RetentionPolicy;
+23import java.lang.annotation.Target;
+24
+25 @Retention(RetentionPolicy.RUNTIME)
+26 @Target({ ElementType.TYPE, ElementType.METHOD })
+27 @ConditionalOnProperty(name = "spring.security.oauth2.resourceserver.jwt.jwk-set-uri")
+28 @interface ConditionalOnOktaResourceServerProperties {}
+
+1/*
+2 * Copyright 2018-Present Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.boot.oauth;
+17
+18import org.springframework.http.HttpStatus;
+19import org.springframework.http.MediaType;
+20import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+21import org.springframework.security.config.web.server.ServerHttpSecurity;
+22import org.springframework.security.core.AuthenticationException;
+23import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository;
+24import org.springframework.security.oauth2.client.registration.ReactiveClientRegistrationRepository;
+25import org.springframework.security.oauth2.client.web.DefaultOAuth2AuthorizationRequestResolver;
+26import org.springframework.security.oauth2.client.web.server.DefaultServerOAuth2AuthorizationRequestResolver;
+27import org.springframework.security.oauth2.core.OAuth2AuthenticationException;
+28import org.springframework.security.oauth2.core.OAuth2Error;
+29import org.springframework.security.oauth2.server.resource.BearerTokenError;
+30import org.springframework.security.oauth2.server.resource.web.BearerTokenAuthenticationEntryPoint;
+31import org.springframework.security.oauth2.server.resource.web.server.BearerTokenServerAuthenticationEntryPoint;
+32import org.springframework.security.web.AuthenticationEntryPoint;
+33import org.springframework.security.web.server.DelegatingServerAuthenticationEntryPoint;
+34import org.springframework.security.web.server.util.matcher.MediaTypeServerWebExchangeMatcher;
+35import org.springframework.security.web.util.matcher.MediaTypeRequestMatcher;
+36import org.springframework.security.web.util.matcher.RequestMatcher;
+37import org.springframework.web.accept.HeaderContentNegotiationStrategy;
+38
+39importstatic org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestCustomizers.withPkce;
+40
+41/**
+42 * Okta + Spring Security utility methods.
+43 * @since 1.2.0
+44 */
+45publicfinalclassOkta {
+46
+47privateOkta() {}
+48
+49/**
+50 * Configures the {@code http} to return a NON-EMPTY response body if the client supports the Media Type text/plain.
+51 * This is to work around an issue with Chrome, when a response body is empty, Chrome will show a `This site can’t be reached`, ERR_INVALID_RESPONSE error.
+52 * The body content will contain the HTTP Status and simple message such as `401 Unauthorized`.
+53 *
+54 * @param http the ServerHttpSecurity to configure
+55 * @return the {@code http} to allow method chaining
+56 */
+57publicstatic ServerHttpSecurity configureResourceServer401ResponseBody(ServerHttpSecurity http) {
+58return http.exceptionHandling()
+59 .authenticationEntryPoint(new DelegatingServerAuthenticationEntryPoint(
+60// clients that accept plain text, browsers, curl, etc
+61new DelegatingServerAuthenticationEntryPoint.DelegateEntry(
+62new MediaTypeServerWebExchangeMatcher(MediaType.TEXT_PLAIN),
+63newBrowserFriendlyBearerTokenServerAuthenticationEntryPoint()),
+64
+65// any non text client application/json etc
+66new DelegatingServerAuthenticationEntryPoint.DelegateEntry(
+67new MediaTypeServerWebExchangeMatcher(MediaType.ALL),
+68new BearerTokenServerAuthenticationEntryPoint()))).and();
+69 }
+70
+71/**
+72 * Configures the {@code http} to return a NON-EMPTY response body if the client supports the Media Type text/plain.
+73 * This is to work around an issue with Chrome, when a response body is empty, Chrome will show a `This site can’t be reached`, ERR_INVALID_RESPONSE error.
+74 * The body content will contain the HTTP Status and simple message such as `401 Unauthorized`.
+75 *
+76 * @param http the HttpSecurity to configure
+77 * @return the {@code http} to allow method chaining
+78 */
+79publicstatic HttpSecurity configureResourceServer401ResponseBody(HttpSecurity http) throws Exception {
+80return http.exceptionHandling()
+81 .defaultAuthenticationEntryPointFor(authenticationEntryPoint(), textRequestMatcher()).and();
+82 }
+83
+84/**
+85 * Configures the {@code http} with an OAuth2 Login, that supports PKCE. The default Spring Security implementation
+86 * only enables PKCE for public clients.
+87 * <p>
+88 * <b>NOTE:</b> Enabling PKCE will be required for all clients (public and confidential) in the future OAuth 2.1 spec.
+89 *
+90 * @param http the ServerHttpSecurity to configure
+91 * @param clientRegistrationRepository the repository bean, this should be injected into the calling method.
+92 * @return the {@code http} to allow method chaining
+93 */
+94publicstatic ServerHttpSecurity configureOAuth2WithPkce(ServerHttpSecurity http, ReactiveClientRegistrationRepository clientRegistrationRepository) {
+95// Create a request resolver that enables PKCE
+96 DefaultServerOAuth2AuthorizationRequestResolver authorizationRequestResolver = new DefaultServerOAuth2AuthorizationRequestResolver(clientRegistrationRepository);
+97 authorizationRequestResolver.setAuthorizationRequestCustomizer(withPkce());
+98// enable oauth2 login that uses PKCE
+99 http.oauth2Login().authorizationRequestResolver(authorizationRequestResolver);
+100
+101return http;
+102 }
+103
+104/**
+105 * Configures the {@code http} with an OAuth2 Login, that supports PKCE. The default Spring Security implementation
+106 * only enables PKCE for public clients.
+107 * <p>
+108 * <b>NOTE:</b> Enabling PKCE will be required for all clients (public and confidential) in the future OAuth 2.1 spec.
+109 *
+110 * @param http the HttpSecurity to configure
+111 * @param clientRegistrationRepository the repository bean, this should be injected into the calling method.
+112 * @return the {@code http} to allow method chaining
+113 * @throws Exception
+114 */
+115publicstatic HttpSecurity configureOAuth2WithPkce(HttpSecurity http, ClientRegistrationRepository clientRegistrationRepository) throws Exception {
+116// Create a request resolver that enables PKCE
+117 DefaultOAuth2AuthorizationRequestResolver authorizationRequestResolver = new DefaultOAuth2AuthorizationRequestResolver(clientRegistrationRepository, "/oauth2/authorization");
+118 authorizationRequestResolver.setAuthorizationRequestCustomizer(withPkce());
+119// enable oauth2 login that uses PKCE
+120 http.oauth2Login()
+121 .authorizationEndpoint()
+122 .authorizationRequestResolver(authorizationRequestResolver);
+123
+124return http;
+125 }
+126
+127privatestatic RequestMatcher textRequestMatcher() {
+128returnnew MediaTypeRequestMatcher(new HeaderContentNegotiationStrategy(), MediaType.TEXT_PLAIN);
+129 }
+130
+131privatestatic AuthenticationEntryPoint authenticationEntryPoint() {
+132 BearerTokenAuthenticationEntryPoint bearerTokenEntryPoint = new BearerTokenAuthenticationEntryPoint();
+133return (request, response, authException) -> {
+134 response.setContentType(MediaType.TEXT_PLAIN.toString());
+135 response.getWriter().print(statusAsString(Okta.getStatus(authException)));
+136 bearerTokenEntryPoint.commence(request, response, authException);
+137 };
+138 }
+139
+140static HttpStatus getStatus(AuthenticationException authException) {
+141if (authException instanceof OAuth2AuthenticationException) {
+142 OAuth2Error error = ((OAuth2AuthenticationException) authException).getError();
+143if (error instanceof BearerTokenError) {
+144return ((BearerTokenError) error).getHttpStatus();
+145 }
+146 }
+147return HttpStatus.UNAUTHORIZED;
+148 }
+149
+150static String statusAsString(HttpStatus status) {
+151return status.value() + " " + status.getReasonPhrase();
+152 }
+153
+154 }
+
+1/*
+2 * Copyright 2018-Present Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.boot.oauth;
+17
+18import org.springframework.security.core.GrantedAuthority;
+19import org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationConverter;
+20import org.springframework.security.oauth2.server.resource.authentication.JwtGrantedAuthoritiesConverter;
+21
+22import java.util.Collection;
+23
+24finalclassOktaJwtAuthenticationConverterextends JwtAuthenticationConverter {
+25
+26publicOktaJwtAuthenticationConverter(String groupClaim) {
+27 JwtGrantedAuthoritiesConverter originalConverter = new JwtGrantedAuthoritiesConverter();
+28this.setJwtGrantedAuthoritiesConverter(source -> {
+29 Collection<GrantedAuthority> result = originalConverter.convert(source);
+30 result.addAll(TokenUtil.tokenClaimsToAuthorities(source.getClaims(), groupClaim));
+31return result;
+32 });
+33 }
+34 }
+
+1/*
+2 * Copyright 2018-Present Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.boot.oauth;
+17
+18import com.okta.spring.boot.oauth.http.Auth0ClientRequestInterceptor;
+19import com.okta.spring.boot.oauth.http.UserAgentRequestInterceptor;
+20import org.springframework.security.oauth2.client.http.OAuth2ErrorResponseErrorHandler;
+21import org.springframework.security.oauth2.client.userinfo.DefaultOAuth2UserService;
+22import org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest;
+23import org.springframework.security.oauth2.core.user.OAuth2User;
+24import org.springframework.web.client.RestOperations;
+25import org.springframework.web.client.RestTemplate;
+26
+27import java.util.Collection;
+28
+29finalclassOktaOAuth2UserServiceextends DefaultOAuth2UserService {
+30
+31privatefinal Collection<AuthoritiesProvider> authoritiesProviders;
+32
+33OktaOAuth2UserService(Collection<AuthoritiesProvider> authoritiesProviders) {
+34this.authoritiesProviders = authoritiesProviders;
+35 setRestOperations(restOperations());
+36 }
+37
+38private RestOperations restOperations() {
+39 RestTemplate restTemplate = new RestTemplate();
+40 restTemplate.setErrorHandler(new OAuth2ErrorResponseErrorHandler());
+41 restTemplate.getInterceptors().add(newUserAgentRequestInterceptor());
+42 restTemplate.getInterceptors().add(newAuth0ClientRequestInterceptor());
+43return restTemplate;
+44 }
+45
+46 @Override
+47public OAuth2User loadUser(OAuth2UserRequest userRequest) {
+48 OAuth2User user = super.loadUser(userRequest);
+49return UserUtil.decorateUser(user, userRequest, authoritiesProviders);
+50 }
+51 }
+
+1/*
+2 * Copyright 2018-Present Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.boot.oauth;
+17
+18import org.springframework.security.oauth2.client.oidc.userinfo.OidcUserRequest;
+19import org.springframework.security.oauth2.client.oidc.userinfo.OidcUserService;
+20import org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest;
+21import org.springframework.security.oauth2.client.userinfo.OAuth2UserService;
+22import org.springframework.security.oauth2.core.OAuth2AuthenticationException;
+23import org.springframework.security.oauth2.core.oidc.user.OidcUser;
+24import org.springframework.security.oauth2.core.user.OAuth2User;
+25
+26import java.util.Collection;
+27
+28finalclassOktaOidcUserServiceextends OidcUserService {
+29
+30privatefinal Collection<AuthoritiesProvider> authoritiesProviders;
+31
+32OktaOidcUserService(OAuth2UserService<OAuth2UserRequest, OAuth2User> oauth2UserService, Collection<AuthoritiesProvider> authoritiesProviders) {
+33this.authoritiesProviders = authoritiesProviders;
+34this.setOauth2UserService(oauth2UserService);
+35 }
+36
+37 @Override
+38public OidcUser loadUser(OidcUserRequest userRequest) throws OAuth2AuthenticationException {
+39 OidcUser user = super.loadUser(userRequest);
+40return UserUtil.decorateUser(user, userRequest, authoritiesProviders);
+41 }
+42 }
+
+1/*
+2 * Copyright 2020-Present Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.boot.oauth;
+17
+18import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
+19import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+20
+21classOktaOpaqueTokenIntrospectConditionalextends AllNestedConditions {
+22
+23OktaOpaqueTokenIntrospectConditional() {
+24super(ConfigurationPhase.REGISTER_BEAN);
+25 }
+26
+27 @ConditionalOnProperty(name="spring.security.oauth2.resourceserver.opaque-token.client-id")
+28staticclass ClientIdCondition { }
+29
+30 @ConditionalOnProperty(name="spring.security.oauth2.resourceserver.opaque-token.client-secret")
+31staticclass ClientSecretCondition { }
+32
+33 @ConditionalOnProperty(name="spring.security.oauth2.resourceserver.opaque-token.introspection-uri")
+34staticclass IntrospectionUriCondition { }
+35 }
+
+1/*
+2 * Copyright 2019-Present Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.boot.oauth;
+17
+18import com.okta.spring.boot.oauth.config.OktaOAuth2Properties;
+19import org.springframework.boot.autoconfigure.AutoConfiguration;
+20import org.springframework.boot.autoconfigure.AutoConfigureBefore;
+21import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+22import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+23import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
+24import org.springframework.boot.autoconfigure.security.oauth2.resource.OAuth2ResourceServerProperties;
+25import org.springframework.boot.autoconfigure.security.oauth2.resource.reactive.ReactiveOAuth2ResourceServerAutoConfiguration;
+26import org.springframework.boot.context.properties.EnableConfigurationProperties;
+27import org.springframework.context.annotation.Bean;
+28import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity;
+29import org.springframework.security.oauth2.jwt.NimbusReactiveJwtDecoder;
+30import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
+31import org.springframework.security.oauth2.server.resource.BearerTokenAuthenticationToken;
+32import org.springframework.web.reactive.function.client.WebClient;
+33
+34 @AutoConfiguration
+35 @AutoConfigureBefore(ReactiveOAuth2ResourceServerAutoConfiguration.class)
+36 @ConditionalOnOktaResourceServerProperties
+37 @EnableConfigurationProperties({OktaOAuth2Properties.class, OAuth2ResourceServerProperties.class})
+38 @ConditionalOnClass({ EnableWebFluxSecurity.class, BearerTokenAuthenticationToken.class, ReactiveJwtDecoder.class })
+39 @ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.REACTIVE)
+40class ReactiveOktaOAuth2ResourceServerAutoConfig {
+41
+42 @Bean
+43 @ConditionalOnMissingBean
+44 ReactiveJwtDecoder jwtDecoder(OAuth2ResourceServerProperties oAuth2ResourceServerProperties, OktaOAuth2Properties oktaOAuth2Properties) {
+45
+46 NimbusReactiveJwtDecoder.JwkSetUriReactiveJwtDecoderBuilder builder =
+47 NimbusReactiveJwtDecoder.withJwkSetUri(oAuth2ResourceServerProperties.getJwt().getJwkSetUri());
+48 builder.webClient(webClient());
+49 NimbusReactiveJwtDecoder decoder = builder.build();
+50 decoder.setJwtValidator(TokenUtil.jwtValidator(oAuth2ResourceServerProperties.getJwt().getIssuerUri(), oktaOAuth2Properties.getAudience()));
+51return decoder;
+52 }
+53
+54private WebClient webClient() {
+55return WebClientUtil.createWebClient();
+56 }
+57 }
+
+1/*
+2 * Copyright 2019-Present Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.boot.oauth;
+17
+18import org.springframework.security.oauth2.client.userinfo.DefaultReactiveOAuth2UserService;
+19import org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest;
+20import org.springframework.security.oauth2.core.user.OAuth2User;
+21import reactor.core.publisher.Mono;
+22
+23import java.util.Collection;
+24
+25finalclassReactiveOktaOAuth2UserServiceextends DefaultReactiveOAuth2UserService {
+26
+27privatefinal Collection<AuthoritiesProvider> authoritiesProviders;
+28
+29ReactiveOktaOAuth2UserService(Collection<AuthoritiesProvider> authoritiesProviders) {
+30this.authoritiesProviders = authoritiesProviders;
+31 setWebClient(WebClientUtil.createWebClient());
+32 }
+33
+34 @Override
+35public Mono<OAuth2User> loadUser(OAuth2UserRequest userRequest) {
+36returnsuper.loadUser(userRequest).map(user -> UserUtil.decorateUser(user, userRequest, authoritiesProviders));
+37 }
+38 }
+
+1/*
+2 * Copyright 2019-Present Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.boot.oauth;
+17
+18import org.springframework.security.oauth2.client.oidc.userinfo.OidcReactiveOAuth2UserService;
+19import org.springframework.security.oauth2.client.oidc.userinfo.OidcUserRequest;
+20import org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest;
+21import org.springframework.security.oauth2.client.userinfo.ReactiveOAuth2UserService;
+22import org.springframework.security.oauth2.core.oidc.user.OidcUser;
+23import org.springframework.security.oauth2.core.user.OAuth2User;
+24import reactor.core.publisher.Mono;
+25
+26import java.util.Collection;
+27
+28finalclassReactiveOktaOidcUserServiceextends OidcReactiveOAuth2UserService {
+29
+30privatefinal Collection<AuthoritiesProvider> authoritiesProviders;
+31
+32ReactiveOktaOidcUserService(Collection<AuthoritiesProvider> authoritiesProviders) {
+33this(authoritiesProviders, newReactiveOktaOAuth2UserService(authoritiesProviders));
+34 }
+35
+36ReactiveOktaOidcUserService(Collection<AuthoritiesProvider> authoritiesProviders, ReactiveOAuth2UserService<OAuth2UserRequest, OAuth2User> oauth2UserService) {
+37this.authoritiesProviders = authoritiesProviders;
+38 setOauth2UserService(oauth2UserService);
+39 }
+40
+41 @Override
+42public Mono<OidcUser> loadUser(OidcUserRequest userRequest) {
+43returnsuper.loadUser(userRequest).map(user -> UserUtil.decorateUser(user, userRequest, authoritiesProviders));
+44 }
+45 }
+
+1/*
+2 * Copyright 2019-Present Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.boot.oauth;
+17
+18import org.springframework.security.core.GrantedAuthority;
+19import org.springframework.security.oauth2.client.oidc.userinfo.OidcUserRequest;
+20import org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest;
+21import org.springframework.security.oauth2.core.oidc.user.DefaultOidcUser;
+22import org.springframework.security.oauth2.core.oidc.user.OidcUser;
+23import org.springframework.security.oauth2.core.user.DefaultOAuth2User;
+24import org.springframework.security.oauth2.core.user.OAuth2User;
+25import org.springframework.util.StringUtils;
+26
+27import java.util.Collection;
+28import java.util.HashSet;
+29import java.util.Objects;
+30import java.util.Set;
+31
+32finalclassUserUtil {
+33
+34privateUserUtil() {}
+35
+36static OAuth2User decorateUser(OAuth2User user, OAuth2UserRequest userRequest, Collection<AuthoritiesProvider> authoritiesProviders) {
+37
+38// Only post process requests from the "Okta" reg
+39if (!"okta".equalsIgnoreCase(userRequest.getClientRegistration().getRegistrationId())) {
+40return user;
+41 }
+42
+43// start with authorities from super
+44 Set<GrantedAuthority> authorities = new HashSet<>(user.getAuthorities());
+45// add each set of authorities from providers
+46 authoritiesProviders.stream()
+47 .map(authoritiesProvider -> authoritiesProvider.getAuthorities(user, userRequest))
+48 .filter(Objects::nonNull)
+49 .forEach(authorities::addAll);
+50
+51 String userNameAttributeName = userRequest.getClientRegistration().getProviderDetails()
+52 .getUserInfoEndpoint().getUserNameAttributeName();
+53
+54returnnew DefaultOAuth2User(authorities, user.getAttributes(), userNameAttributeName);
+55 }
+56
+57static OidcUser decorateUser(OidcUser user, OidcUserRequest userRequest, Collection<AuthoritiesProvider> authoritiesProviders) {
+58
+59// Only post process requests from the "Okta" reg
+60if (!"okta".equals(userRequest.getClientRegistration().getRegistrationId())) {
+61return user;
+62 }
+63
+64// start with authorities from super
+65 Set<GrantedAuthority> authorities = new HashSet<>(user.getAuthorities());
+66// add each set of authorities from providers
+67 authoritiesProviders.stream()
+68 .map(authoritiesProvider -> authoritiesProvider.getAuthorities(user, userRequest))
+69 .filter(Objects::nonNull)
+70 .forEach(authorities::addAll);
+71
+72 String userNameAttributeName = userRequest.getClientRegistration()
+73 .getProviderDetails().getUserInfoEndpoint().getUserNameAttributeName();
+74
+75return StringUtils.hasText(userNameAttributeName)
+76 ? new DefaultOidcUser(authorities, user.getIdToken(), user.getUserInfo(), userNameAttributeName)
+77 : new DefaultOidcUser(authorities, user.getIdToken(), user.getUserInfo());
+78 }
+79 }
+
+1/*
+2 * Copyright 2019-Present Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.boot.oauth;
+17
+18import com.okta.commons.lang.ApplicationInfo;
+19import org.springframework.http.HttpHeaders;
+20import org.springframework.web.reactive.function.client.WebClient;
+21
+22import java.util.stream.Collectors;
+23
+24finalclassWebClientUtil {
+25
+26privatestaticfinal String USER_AGENT_VALUE = ApplicationInfo.get().entrySet().stream()
+27 .map(e -> e.getKey() + "/" + e.getValue())
+28 .collect(Collectors.joining(" "));
+29
+30privateWebClientUtil() {}
+31
+32static WebClient createWebClient() {
+33return WebClient.builder()
+34 .defaultHeader(HttpHeaders.USER_AGENT, USER_AGENT_VALUE)
+35 .build();
+36 }
+37 }
+
+1/*
+2 * Copyright 2020-Present Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.boot.oauth.env;
+17
+18import com.okta.commons.configcheck.ConfigurationValidator;
+19import com.okta.commons.configcheck.ValidationResponse;
+20import org.slf4j.Logger;
+21import org.slf4j.LoggerFactory;
+22import org.springframework.boot.context.event.ApplicationPreparedEvent;
+23import org.springframework.context.ApplicationEvent;
+24import org.springframework.context.event.SmartApplicationListener;
+25import org.springframework.core.Ordered;
+26import org.springframework.core.env.ConfigurableEnvironment;
+27
+28publicclassOktaEnvironmentPostProcessorApplicationListenerimplements SmartApplicationListener, Ordered {
+29
+30privatestaticfinal Logger log = LoggerFactory.getLogger(OktaEnvironmentPostProcessorApplicationListener.class);
+31
+32 @Override
+33publicvoid onApplicationEvent(ApplicationEvent event) {
+34if (event instanceof ApplicationPreparedEvent) {
+35 ConfigurableEnvironment environment = ((ApplicationPreparedEvent) event).getApplicationContext().getEnvironment();
+36 ValidationResponse validationResponse = ConfigurationValidator.validateIssuer(environment.getProperty("okta.oauth2.issuer"));
+37if (!validationResponse.isValid()) {
+38 log.warn(validationResponse.getMessage() + System.lineSeparator() +
+39"To fix this add the `okta.oauth2.issuer` property to your application environments.");
+40 }
+41 }
+42 }
+43
+44 @Override
+45publicboolean supportsEventType(Class<? extends ApplicationEvent> eventType) {
+46return ApplicationPreparedEvent.class.isAssignableFrom(eventType);
+47 }
+48
+49 @Override
+50publicint getOrder() {
+51return Ordered.LOWEST_PRECEDENCE;
+52 }
+53 }
+
+1/*
+2 * Copyright 2017 Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.boot.oauth.env;
+17
+18import org.springframework.core.env.EnumerablePropertySource;
+19import org.springframework.core.env.Environment;
+20import org.springframework.core.env.PropertySource;
+21
+22import java.util.HashMap;
+23import java.util.Map;
+24import java.util.Objects;
+25
+26/**
+27 * A {@link PropertySource} that supports aliasing/renaming of keys. For alias the key {@code foo} to the key
+28 * {@code {bar}} whenever either of the values are looked up they will return the same value. This differs from setting
+29 * {@code foo=${bar}}, in that if the value of {@code bar} is {@code null}, {@code null} is returned,
+30 * if {@code ${bar}} was used, an exception would be thrown due to the unresolvable property {@code bar}.
+31 *
+32 * @since 0.3.0
+33 */
+34finalclassRemappedPropertySourceextends EnumerablePropertySource<String> {
+35
+36privatefinal Map<String, String> aliasMap = new HashMap<>();
+37privatefinal Environment environment;
+38
+39publicRemappedPropertySource(String name, Map<String, String> aliasMap, Environment environment) {
+40super(name);
+41this.aliasMap.putAll(aliasMap);
+42this.environment = environment;
+43 }
+44
+45 @Override
+46public Object getProperty(String name) {
+47
+48 String remappedKey = aliasMap.get(name);
+49if (remappedKey != null) {
+50return environment.getProperty(remappedKey);
+51 }
+52
+53returnnull;
+54 }
+55
+56 @Override
+57publicboolean containsProperty(String name) {
+58return getProperty(name) != null;
+59 }
+60
+61 @Override
+62public String[] getPropertyNames() {
+63return aliasMap.keySet().toArray(new String[0]);
+64 }
+65
+66 @Override
+67publicboolean equals(Object o) {
+68if (this == o) returntrue;
+69if (o == null || getClass() != o.getClass()) return false;
+70if (!super.equals(o)) return false;
+71RemappedPropertySource that = (RemappedPropertySource) o;
+72return Objects.equals(aliasMap, that.aliasMap) &&
+73 Objects.equals(environment, that.environment);
+74 }
+75
+76 @Override
+77publicint hashCode() {
+78return Objects.hash(super.hashCode(), aliasMap, environment);
+79 }
+80 }
+
+1/*
+2 * Copyright 2018-Present Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.boot.oauth.http;
+17
+18import com.okta.commons.lang.ApplicationInfo;
+19import org.springframework.http.HttpHeaders;
+20import org.springframework.http.HttpRequest;
+21import org.springframework.http.client.ClientHttpRequestExecution;
+22import org.springframework.http.client.ClientHttpRequestInterceptor;
+23import org.springframework.http.client.ClientHttpResponse;
+24
+25import java.io.IOException;
+26import java.util.stream.Collectors;
+27
+28publicfinalclassUserAgentRequestInterceptorimplements ClientHttpRequestInterceptor {
+29
+30privatefinalstatic String USER_AGENT_VALUE = ApplicationInfo.get().entrySet().stream()
+31 .map(e -> e.getKey() + "/" + e.getValue())
+32 .collect(Collectors.joining(" "));
+33
+34 @Override
+35public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) throws IOException {
+36 request.getHeaders().add(HttpHeaders.USER_AGENT, USER_AGENT_VALUE);
+37return execution.execute(request, body);
+38 }
+39 }
+
+1/*
+2 * Copyright 2015 Stormpath, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.boot.sdk.cache;
+17
+18import com.okta.commons.lang.Assert;
+19import com.okta.sdk.cache.Cache;
+20
+21/**
+22 * A Okta SDK {@link com.okta.sdk.cache.Cache} implementation that wraps a Spring {@link org.springframework.cache.Cache Cache} instance.
+23 * This allows the Okta SDK to use your existing Spring caching mechanism so you only need to configure one
+24 * caching implementation.
+25 * <p>
+26 * This implementation effectively acts as an adapter or bridge from the Okta SDK cache API to the Spring cache API.
+27 *
+28 * @param <K> The cache key type
+29 * @param <V> The cache value type
+30 * @since 0.3.0
+31 */
+32 @SuppressWarnings("unchecked")
+33publicclass SpringCache<K, V> implements Cache<K, V> {
+34
+35privatefinal org.springframework.cache.Cache springCache;
+36
+37publicSpringCache(org.springframework.cache.Cache springCache) {
+38 Assert.notNull(springCache, "spring cache instance cannot be null.");
+39this.springCache = springCache;
+40 }
+41
+42 @Override
+43public V get(K key) {
+44 org.springframework.cache.Cache.ValueWrapper vw = springCache.get(key);
+45if (vw == null) {
+46returnnull;
+47 }
+48return (V) vw.get();
+49 }
+50
+51 @Override
+52public V put(K key, V value) {
+53 springCache.put(key, value);
+54return get(key);
+55 }
+56
+57 @Override
+58public V remove(K key) {
+59 V v = get(key);
+60 springCache.evict(key);
+61return v;
+62 }
+63 }
+
+1/*
+2 * Copyright 2015 Stormpath, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.boot.sdk.cache;
+17
+18import com.okta.sdk.cache.Cache;
+19import com.okta.sdk.cache.CacheManager;
+20import com.okta.commons.lang.Assert;
+21import org.springframework.beans.factory.InitializingBean;
+22
+23/**
+24 * A Okta SDK {@link com.okta.sdk.cache.CacheManager} implementation that wraps a Spring
+25 * {@link org.springframework.cache.CacheManager CacheManager} instance. This allows the Okta SDK to use your
+26 * existing Spring caching mechanism so you only need to configure one caching implementation.
+27 * <p>
+28 * This implementation effectively acts as an adapter or bridge from the Okta SDK cacheManager API to the Spring
+29 * CacheManager API.
+30 *
+31 * @since 0.3.0
+32 */
+33publicclassSpringCacheManagerimplements CacheManager, InitializingBean {
+34
+35private org.springframework.cache.CacheManager springCacheManager;
+36
+37publicSpringCacheManager(){}
+38
+39/**
+40 * Constructs a new {@code SpringCacheManager} instance that wraps (delegates to) the specified
+41 * Spring {@link org.springframework.cache.CacheManager CacheManager} instance.
+42 *
+43 * @param springCacheManager the target Spring cache manager to wrap.
+44 */
+45publicSpringCacheManager(org.springframework.cache.CacheManager springCacheManager) {
+46 Assert.notNull(springCacheManager, "CacheManager argument cannot be null.");
+47this.springCacheManager = springCacheManager;
+48 }
+49
+50publicvoid setSpringCacheManager(org.springframework.cache.CacheManager cacheManager) {
+51this.springCacheManager = cacheManager;
+52 }
+53
+54 @Override
+55publicvoid afterPropertiesSet() throws Exception {
+56 Assert.notNull(springCacheManager, "springCacheManager instance must be specified.");
+57 }
+58
+59/**
+60 * Consults the wrapped Spring {@link org.springframework.cache.CacheManager CacheManager} instance to obtain a
+61 * named Spring {@link org.springframework.cache.Cache Cache} instance. The instance is wrapped and returned as a
+62 * {@link SpringCache} instance, which acts as a bridge/adapter over Spring's existing Cache API.
+63 *
+64 * @param name the name of the cache to acquire.
+65 * @param <K> The cache key type
+66 * @param <V> The cache value type
+67 * @return the Cache with the given name
+68 */
+69 @Override
+70public <K, V> Cache<K, V> getCache(String name) {
+71 org.springframework.cache.Cache springCache = this.springCacheManager.getCache(name);
+72returnnew SpringCache<>(springCache);
+73 }
+74 }
+
+1/*
+2 * Copyright 2017-Present Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.example;
+17
+18import org.springframework.boot.SpringApplication;
+19import org.springframework.boot.autoconfigure.SpringBootApplication;
+20import org.springframework.context.annotation.Bean;
+21import org.springframework.context.annotation.Configuration;
+22import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
+23import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+24import org.springframework.security.web.SecurityFilterChain;
+25
+26 @SpringBootApplication
+27 @EnableMethodSecurity(securedEnabled = true)
+28publicclassHostedLoginCodeFlowExampleApplication {
+29
+30publicstaticvoid main(String[] args) {
+31 SpringApplication.run(HostedLoginCodeFlowExampleApplication.class, args);
+32 }
+33
+34 @Configuration
+35staticclass SecurityConfig {
+36
+37 @Bean
+38 SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
+39 http.authorizeHttpRequests((requests) -> requests
+40 .requestMatchers("/okta-custom-login", "/css/okta.css").permitAll()
+41 .anyRequest().authenticated()
+42 )
+43 .oauth2Client()
+44 .and()
+45 .oauth2Login()
+46 .and()
+47 .oauth2ResourceServer().jwt();
+48return http.build();
+49 }
+50 }
+51 }
+
+1/*
+2 * Copyright 2017 Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.example;
+17
+18import org.springframework.boot.SpringApplication;
+19import org.springframework.boot.autoconfigure.SpringBootApplication;
+20import org.springframework.context.annotation.Bean;
+21import org.springframework.context.annotation.Configuration;
+22import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
+23import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+24import org.springframework.security.web.SecurityFilterChain;
+25
+26 @SpringBootApplication
+27 @EnableMethodSecurity(prePostEnabled = true, securedEnabled = true)
+28publicclassImplicitFlowApplication {
+29
+30publicstaticvoid main(String[] args) {
+31 SpringApplication.run(ImplicitFlowApplication.class, args);
+32 }
+33
+34 @Configuration
+35staticclass SecurityConfig {
+36
+37 @Bean
+38 SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
+39 http.authorizeHttpRequests((requests) -> requests
+40 .requestMatchers("/", "/index.html", "/sign-in-widget-config").permitAll()
+41 .anyRequest().authenticated()
+42 )
+43 .oauth2ResourceServer().jwt();
+44
+45return http.build();
+46 }
+47 }
+48 }
+
+1/*
+2 * Copyright 2017 Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.example;
+17
+18import org.springframework.boot.SpringApplication;
+19import org.springframework.boot.autoconfigure.SpringBootApplication;
+20import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
+21
+22 @SpringBootApplication
+23 @EnableMethodSecurity(securedEnabled = true)
+24publicclassRedirectCodeFlowApplication {
+25
+26publicstaticvoid main(String[] args) {
+27 SpringApplication.run(RedirectCodeFlowApplication.class, args);
+28 }
+29
+30// By default Spring configures the equivalent for you. Secure by default.
+31
+32// @Configuration
+33// static class SecurityConfig {
+34// @Bean
+35// SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
+36// http.authorizeHttpRequests()
+37// .anyRequest().authenticated()
+38// .and().oauth2Client()
+39// .and().oauth2Login()
+40// .and().oauth2ResourceServer().jwt()
+41// return http.build();
+42// }
+43// }
+44 }
+
+1/*
+2 * Copyright 2017 Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.example.controllers;
+17
+18import com.okta.spring.boot.oauth.config.OktaOAuth2Properties;
+19import org.springframework.stereotype.Controller;
+20import org.springframework.web.bind.annotation.GetMapping;
+21import org.springframework.web.bind.annotation.RequestParam;
+22import org.springframework.web.servlet.ModelAndView;
+23
+24import java.net.MalformedURLException;
+25import java.net.URL;
+26
+27 @Controller
+28publicclassLoginController {
+29
+30privatestaticfinal String STATE = "state";
+31privatestaticfinal String SCOPES = "scopes";
+32privatestaticfinal String OKTA_BASE_URL = "oktaBaseUrl";
+33privatestaticfinal String OKTA_CLIENT_ID = "oktaClientId";
+34privatestaticfinal String REDIRECT_URI = "redirectUri";
+35privatestaticfinal String ISSUER_URI = "issuerUri";
+36
+37privatefinalOktaOAuth2Properties oktaOAuth2Properties;
+38
+39publicLoginController(OktaOAuth2Properties oktaOAuth2Properties) {
+40this.oktaOAuth2Properties = oktaOAuth2Properties;
+41 }
+42
+43 @GetMapping(value = "/okta-custom-login")
+44public ModelAndView login(@RequestParam("state") String state) throws MalformedURLException {
+45
+46 String issuer = oktaOAuth2Properties.getIssuer();
+47// the widget needs the base url, just grab the root of the issuer
+48 String orgUrl = new URL(new URL(issuer), "/").toString();
+49
+50 ModelAndView mav = new ModelAndView("okta/login");
+51 mav.addObject(STATE, state);
+52 mav.addObject(SCOPES, oktaOAuth2Properties.getScopes());
+53 mav.addObject(OKTA_BASE_URL, orgUrl);
+54 mav.addObject(OKTA_CLIENT_ID, oktaOAuth2Properties.getClientId());
+55// from ClientRegistration.redirectUriTemplate, if the template is change you must update this
+56 mav.addObject(REDIRECT_URI, "/login/oauth2/code/okta");
+57 mav.addObject(ISSUER_URI, issuer);
+58return mav;
+59 }
+60 }
+
+1/*
+2 * Copyright 2017 Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.example.controllers;
+17
+18import org.springframework.beans.factory.annotation.Value;
+19import org.springframework.web.bind.annotation.GetMapping;
+20import org.springframework.web.bind.annotation.RestController;
+21
+22import java.util.LinkedHashMap;
+23import java.util.Map;
+24
+25 @RestController
+26publicclassSignInWidgetConfigController {
+27
+28privatefinal String issuer;
+29
+30privatefinal String clientId;
+31
+32publicSignInWidgetConfigController(@Value("${okta.oauth2.issuer}") String issuer,
+33 @Value("${okta.oauth2.client-id}") String clientId) {
+34this.issuer = issuer;
+35this.clientId = clientId;
+36 }
+37
+38 @GetMapping("/sign-in-widget-config")
+39public WidgetConfig getWidgetConfig() {
+40returnnew WidgetConfig(issuer, clientId);
+41 }
+42
+43publicstaticclass WidgetConfig {
+44public String baseUrl;
+45public String clientId;
+46public Map<String, Object> authParams = new LinkedHashMap<>();
+47
+48public WidgetConfig(String issuer, String clientId) {
+49
+50this.clientId = clientId;
+51this.authParams.put("issuer", issuer);
+52this.baseUrl = issuer.replaceAll("/oauth2/.*", "");
+53 }
+54 }
+55 }
+
+1/*
+2 * Copyright 2017 Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.example.controllers;
+17
+18import org.springframework.security.access.prepost.PreAuthorize;
+19import org.springframework.web.bind.annotation.GetMapping;
+20import org.springframework.web.bind.annotation.RestController;
+21
+22import java.security.Principal;
+23
+24 @RestController
+25publicclassWelcomeController {
+26
+27/**
+28 * Simple example REST endpoint that returns a static message. This controller also serves as an example for checking
+29 * an OAuth scope and client roles (parsed from an access token).
+30 * @return a static welcome message
+31 */
+32 @GetMapping("/")
+33 @PreAuthorize("hasAuthority('Everyone')")
+34public Welcome getMessageOfTheDay(Principal principal) {
+35returnnew Welcome("The message of the day is boring.", principal.getName());
+36 }
+37
+38publicstaticclass Welcome {
+39public String messageOfTheDay;
+40public String username;
+41
+42public Welcome() {}
+43
+44public Welcome(String messageOfTheDay, String username) {
+45this.messageOfTheDay = messageOfTheDay;
+46this.username = username;
+47 }
+48 }
+49 }
+
+1/*
+2 * Copyright 2019-Present Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.example.webflux;
+17
+18import org.springframework.boot.SpringApplication;
+19import org.springframework.boot.autoconfigure.SpringBootApplication;
+20import org.springframework.context.annotation.Bean;
+21
+22import org.springframework.security.config.annotation.method.configuration.EnableReactiveMethodSecurity;
+23import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity;
+24import org.springframework.security.config.web.server.ServerHttpSecurity;
+25import org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken;
+26import org.springframework.security.web.server.SecurityWebFilterChain;
+27import org.springframework.web.bind.annotation.GetMapping;
+28import org.springframework.web.bind.annotation.RestController;
+29import reactor.core.publisher.Mono;
+30
+31 @SpringBootApplication
+32 @RestController
+33 @EnableReactiveMethodSecurity
+34publicclassReactiveApplication {
+35
+36publicstaticvoid main(String[] args) {
+37 SpringApplication.run(ReactiveApplication.class, args);
+38 }
+39
+40 @GetMapping("/userdetails")
+41public Mono<OAuth2AuthenticationToken> userDetailsMono(Mono<OAuth2AuthenticationToken> token) {
+42return token;
+43 }
+44
+45 @EnableWebFluxSecurity
+46staticclass SecurityConfiguration {
+47
+48 @Bean
+49public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
+50return http
+51 .authorizeExchange()
+52 .anyExchange().authenticated()
+53 .and()
+54 .oauth2Login()
+55 .and()
+56 .oauth2ResourceServer()
+57 .jwt().and().and().build();
+58 }
+59 }
+60 }
+
+1/*
+2 * Copyright 2019-Present Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License")
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.tests.common.reactive.code;
+17
+18import com.okta.spring.boot.oauth.Okta;
+19import org.springframework.boot.SpringApplication;
+20import org.springframework.boot.autoconfigure.SpringBootApplication;
+21import org.springframework.context.annotation.Bean;
+22import org.springframework.security.access.prepost.PreAuthorize;
+23import org.springframework.security.config.annotation.method.configuration.EnableReactiveMethodSecurity;
+24import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity;
+25import org.springframework.security.config.web.server.ServerHttpSecurity;
+26import org.springframework.security.oauth2.client.registration.ReactiveClientRegistrationRepository;
+27import org.springframework.security.web.server.SecurityWebFilterChain;
+28import org.springframework.web.bind.annotation.GetMapping;
+29import org.springframework.web.bind.annotation.RestController;
+30import reactor.core.publisher.Mono;
+31
+32import java.security.Principal;
+33import java.util.Date;
+34
+35 @SpringBootApplication
+36 @RestController
+37 @EnableReactiveMethodSecurity
+38publicclassReactiveRedirectCodeFlowApplication {
+39
+40 @GetMapping(value = "/")
+41public Message getMessageOfTheDay(Principal principal) {
+42returnnew Message("Welcome home, The message of the day is boring: " + principal.getName());
+43 }
+44
+45 @GetMapping("/everyone")
+46 @PreAuthorize("hasAuthority('Everyone')")
+47public Mono<String> everyoneAccess(Principal principal) {
+48return Mono.just("Everyone has Access: " + principal.getName());
+49 }
+50
+51 @GetMapping("/invalidGroup")
+52 @PreAuthorize("hasAuthority('invalidGroup')")
+53public Mono<String> invalidGroup() {
+54thrownew IllegalStateException("Test exception, user should not have access to this method");
+55 }
+56
+57 @EnableWebFluxSecurity
+58staticclass SecurityConfiguration {
+59
+60 @Bean
+61public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http, ReactiveClientRegistrationRepository clientRegistrationRepository) {
+62 http
+63 .authorizeExchange()
+64 .anyExchange().authenticated()
+65 .and()
+66 .csrf().disable(); // make testing easier
+67
+68 Okta.configureOAuth2WithPkce(http, clientRegistrationRepository);
+69
+70return http.build();
+71 }
+72 }
+73
+74staticclass Message {
+75public Date date = new Date();
+76public String text;
+77
+78 Message(String text) {
+79this.text = text;
+80 }
+81 }
+82
+83publicstaticvoid main(String[] args) {
+84 SpringApplication.run(ReactiveRedirectCodeFlowApplication.class, args);
+85 }
+86 }
+
+1/*
+2 * Copyright 2017 Okta, Inc.
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License")
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16package com.okta.spring.tests.common.servlet.code;
+17
+18import org.springframework.boot.SpringApplication;
+19import org.springframework.boot.autoconfigure.SpringBootApplication;
+20import org.springframework.context.annotation.Bean;
+21import org.springframework.security.access.prepost.PreAuthorize;
+22import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
+23import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+24import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository;
+25import org.springframework.security.web.SecurityFilterChain;
+26import org.springframework.web.bind.annotation.GetMapping;
+27import org.springframework.web.bind.annotation.RestController;
+28
+29import java.security.Principal;
+30
+31importstatic com.okta.spring.boot.oauth.Okta.configureOAuth2WithPkce;
+32
+33 @SpringBootApplication
+34 @RestController
+35 @EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
+36publicclassBasicRedirectCodeFlowApplication {
+37
+38 @GetMapping("/")
+39 @PreAuthorize("hasAuthority('SCOPE_email')")
+40public String getMessageOfTheDay(Principal principal) {
+41return"Welcome home, The message of the day is boring: " + principal.getName();
+42 }
+43
+44 @GetMapping("/everyone")
+45 @PreAuthorize("hasAuthority('Everyone')")
+46public String everyoneAccess(Principal principal) {
+47return"Everyone has Access: " + principal.getName();
+48 }
+49
+50 @GetMapping("/invalidGroup")
+51 @PreAuthorize("hasAuthority('invalidGroup')")
+52public String invalidGroup() {
+53thrownew IllegalStateException("Test exception, user should not have access to this method");
+54 }
+55
+56// The following isn't needed as the equivalent is provided by Spring Boot Security by default
+57 @Bean
+58 SecurityFilterChain oauth2SecurityFilterChain(HttpSecurity http, ClientRegistrationRepository clientRegistrationRepository) throws Exception {
+59 http.authorizeRequests().anyRequest().authenticated();
+60 configureOAuth2WithPkce(http, clientRegistrationRepository);
+61 http.oauth2Client();
+62
+63// disable csrf to make testing easier
+64 http.csrf().disable();
+65
+66return http.build();
+67 }
+68
+69publicstaticvoid main(String[] args) {
+70 SpringApplication.run(BasicRedirectCodeFlowApplication.class, args);
+71 }
+72 }
+
diff --git a/apidocs/type-search-index.js b/apidocs/type-search-index.js
index 17681cb2e..3ae8714b5 100644
--- a/apidocs/type-search-index.js
+++ b/apidocs/type-search-index.js
@@ -1 +1 @@
-typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"com.okta.spring.boot.oauth","l":"AuthoritiesProvider"},{"p":"com.okta.spring.tests.common.servlet.jwt","l":"BasicJwtResourceServerApplication"},{"p":"com.okta.spring.tests.common.servlet.opaquetoken","l":"BasicOpaqueTokenResourceServerApplication"},{"p":"com.okta.spring.tests.common.servlet.code","l":"BasicRedirectCodeFlowApplication"},{"p":"com.okta.spring.boot.sdk.config","l":"OktaClientProperties.ClientProxyInfo"},{"p":"com.okta.example.cloud.configserver","l":"ConfigServerApplication"},{"p":"com.okta.spring.example","l":"HostedLoginCodeFlowExampleApplication"},{"p":"com.okta.spring.example","l":"ImplicitFlowApplication"},{"p":"com.okta.spring.example.controllers","l":"LoginController"},{"p":"com.okta.spring.tests.common.servlet.jwt","l":"BasicJwtResourceServerApplication.MessageOfTheDayController"},{"p":"com.okta.spring.tests.common.servlet.opaquetoken","l":"BasicOpaqueTokenResourceServerApplication.MessageOfTheDayController"},{"p":"com.okta.spring.tests.common.reactive.implicit","l":"ReactiveImplicitFlowApplication.MessageOfTheDayController"},{"p":"com.okta.spring.boot.oauth.env","l":"OIDCMetadata"},{"p":"com.okta.spring.boot.oauth","l":"Okta"},{"p":"com.okta.spring.boot.sdk.config","l":"OktaClientProperties"},{"p":"com.okta.spring.boot.oauth.env","l":"OktaEnvironmentPostProcessorApplicationListener"},{"p":"com.okta.spring.boot.oauth.config","l":"OktaOAuth2Properties"},{"p":"com.okta.spring.boot.sdk","l":"OktaSdkConfig"},{"p":"com.okta.spring.boot.oauth.config","l":"OktaOAuth2Properties.Proxy"},{"p":"com.okta.spring.example.webflux","l":"ReactiveApplication"},{"p":"com.okta.spring.tests.common.reactive.implicit","l":"ReactiveImplicitFlowApplication"},{"p":"com.okta.spring.tests.common.reactive.code","l":"ReactiveRedirectCodeFlowApplication"},{"p":"com.okta.spring.example","l":"RedirectCodeFlowApplication"},{"p":"com.okta.spring.example.controllers","l":"SignInWidgetConfigController"},{"p":"com.okta.spring.boot.sdk.cache","l":"SpringCache"},{"p":"com.okta.spring.boot.sdk.cache","l":"SpringCacheManager"},{"p":"com.okta.spring.boot.oauth.http","l":"UserAgentRequestInterceptor"},{"p":"com.okta.spring.example.controllers","l":"WelcomeController.Welcome"},{"p":"com.okta.spring.example.controllers","l":"WelcomeController"},{"p":"com.okta.spring.example.controllers","l":"SignInWidgetConfigController.WidgetConfig"}];updateSearchResults();
\ No newline at end of file
+typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"com.okta.spring.boot.oauth.http","l":"Auth0ClientRequestInterceptor"},{"p":"com.okta.spring.boot.oauth","l":"AuthoritiesProvider"},{"p":"com.okta.spring.tests.common.servlet.jwt","l":"BasicJwtResourceServerApplication"},{"p":"com.okta.spring.tests.common.servlet.opaquetoken","l":"BasicOpaqueTokenResourceServerApplication"},{"p":"com.okta.spring.tests.common.servlet.code","l":"BasicRedirectCodeFlowApplication"},{"p":"com.okta.spring.boot.sdk.config","l":"OktaClientProperties.ClientProxyInfo"},{"p":"com.okta.example.cloud.configserver","l":"ConfigServerApplication"},{"p":"com.okta.spring.example","l":"HostedLoginCodeFlowExampleApplication"},{"p":"com.okta.spring.example","l":"ImplicitFlowApplication"},{"p":"com.okta.spring.example.controllers","l":"LoginController"},{"p":"com.okta.spring.tests.common.servlet.jwt","l":"BasicJwtResourceServerApplication.MessageOfTheDayController"},{"p":"com.okta.spring.tests.common.servlet.opaquetoken","l":"BasicOpaqueTokenResourceServerApplication.MessageOfTheDayController"},{"p":"com.okta.spring.tests.common.reactive.implicit","l":"ReactiveImplicitFlowApplication.MessageOfTheDayController"},{"p":"com.okta.spring.boot.oauth.env","l":"OIDCMetadata"},{"p":"com.okta.spring.boot.oauth","l":"Okta"},{"p":"com.okta.spring.boot.sdk.config","l":"OktaClientProperties"},{"p":"com.okta.spring.boot.oauth.env","l":"OktaEnvironmentPostProcessorApplicationListener"},{"p":"com.okta.spring.boot.oauth.config","l":"OktaOAuth2Properties"},{"p":"com.okta.spring.boot.sdk","l":"OktaSdkConfig"},{"p":"com.okta.spring.boot.oauth.config","l":"OktaOAuth2Properties.Proxy"},{"p":"com.okta.spring.example.webflux","l":"ReactiveApplication"},{"p":"com.okta.spring.tests.common.reactive.implicit","l":"ReactiveImplicitFlowApplication"},{"p":"com.okta.spring.tests.common.reactive.code","l":"ReactiveRedirectCodeFlowApplication"},{"p":"com.okta.spring.example","l":"RedirectCodeFlowApplication"},{"p":"com.okta.spring.example.controllers","l":"SignInWidgetConfigController"},{"p":"com.okta.spring.boot.sdk.cache","l":"SpringCache"},{"p":"com.okta.spring.boot.sdk.cache","l":"SpringCacheManager"},{"p":"com.okta.spring.boot.oauth.http","l":"UserAgentRequestInterceptor"},{"p":"com.okta.spring.example.controllers","l":"WelcomeController.Welcome"},{"p":"com.okta.spring.example.controllers","l":"WelcomeController"},{"p":"com.okta.spring.example.controllers","l":"SignInWidgetConfigController.WidgetConfig"}];updateSearchResults();
\ No newline at end of file
diff --git a/index.html b/index.html
index 1e959b994..6732ee0b1 100644
--- a/index.html
+++ b/index.html
@@ -21,40 +21,11 @@
\ No newline at end of file
diff --git a/xref/allclasses-frame.html b/xref/allclasses-frame.html
index 8fcd93664..8c24f5b7a 100644
--- a/xref/allclasses-frame.html
+++ b/xref/allclasses-frame.html
@@ -11,6 +11,7 @@