| | |
| | | |
| | | /** |
| | | * Die Klasse Authenticator authentifziert gemäß OAuth-Spezifikation |
| | | * |
| | | * |
| | | * "The OAuth 2.0 Authorization Framework: Bearer Token Usage" |
| | | * https://datatracker.ietf.org/doc/html/rfc6750 |
| | | * |
| | | * |
| | | * weitere Info-Links |
| | | * https://www.oauth.com/oauth2-servers/making-authenticated-requests/refreshing-an-access-token/ |
| | | * https://swagger.io/docs/specification/authentication/bearer-authentication/ |
| | | * |
| | |
| | | * im WWW-Authenticate Header bestimmen |
| | | * |
| | | * @param exchange |
| | | * @return den Ausdruck fuer den WWW-Authenticate Header |
| | | */ |
| | | protected String getWWWAuthRealm(HttpExchange exchange) { |
| | | return wwwAuthRealm; |
| | |
| | | * WWW-Authenticate: Bearer realm="example" |
| | | * |
| | | * @param exchange |
| | | * @return |
| | | * @throws java.io.IOException |
| | | * @return das Ergebnis |
| | | */ |
| | | protected Result unauthorized(HttpExchange exchange) { |
| | | StringBuilder sb = new StringBuilder(); |