{"repo":"curityio/oauth-filter-for-java","free":true,"listed":false,"github":"https://github.com/curityio/oauth-filter-for-java","clone":"git clone https://github.com/curityio/oauth-filter-for-java.git","description":"A Servlet Filter that can be used for OAuth 2.0 protection in any Java-based Web API","language":"Java","stars":22,"topics":["api","claims","oauth2","scopes","sdk","zero-trust"],"license":"Apache-2.0","category":"auth-billing-email","readme_excerpt":"OAuth Filter for Java This project contains a Servlet Filter that authenticates and authorizes requests using OAuth access tokens of various kinds. There are two OAuthFilter implementations. OAuthJwtFilter and OAuthOpaqueFilter . Both implement jakarta.servlet.Filter , and can be used to protect APIs built using Java. Depending on the format of the access token, these two concrete implementations can be used in the following manner: 1. If the token is a Json Web Token (JWT) then validate the token using a public key 2. If the token is a reference (opaque) token, then validate by calling the OAuth server's introspection endpoint. An example of how to use this filter can be found in a separate repository. Filter Overview The filter is built to perform two tasks. 1. Authenticate the caller by validating the incoming access token 2. Authorize the operation by validating the scopes in the access token against the configured scopes The authorization is very basic, and in the default implementation only checks that all configured scopes are present in the token. A more advanced scenario could check the HTTP method, along with sub-paths in order to determine if the appropriate scope is present in the request. To change the default behavior, override the method io.curity.oauth.OAuthFilter#authorize . Using Json Web Tokens (JWT) OAuthJwtFilter implements a filter that expects a Json Web Token, and that can validate the token either by using a pre-shared certificate or by calling the OA","default_branch":null,"files":null,"tree":[],"storefront":"/r/curityio","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/curityio/oauth-filter-for-java/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}