PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
oauth2_middleware.h File Reference

OAuth 2.0 middleware for DICOMweb endpoint authorization. More...

#include "kcenon/pacs/web/auth/jwks_provider.h"
#include "kcenon/pacs/web/auth/jwt_validator.h"
#include "kcenon/pacs/web/auth/oauth2_config.h"
#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <vector>
#include "kcenon/pacs/security/user_context.h"
Include dependency graph for oauth2_middleware.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  kcenon::pacs::web::auth::auth_result
 Result of a successful OAuth 2.0 authentication. More...
 
class  kcenon::pacs::web::auth::oauth2_middleware
 

Namespaces

namespace  crow
 
namespace  kcenon
 
namespace  kcenon::pacs
 
namespace  kcenon::pacs::security
 
namespace  kcenon::pacs::web
 
namespace  kcenon::pacs::web::auth
 
namespace  kcenon::pacs::web::auth::dicomweb_scopes
 Standard OAuth 2.0 scopes for DICOMweb operations.
 

Variables

constexpr std::string_view kcenon::pacs::web::auth::dicomweb_scopes::read = "dicomweb.read"
 
constexpr std::string_view kcenon::pacs::web::auth::dicomweb_scopes::search = "dicomweb.search"
 
constexpr std::string_view kcenon::pacs::web::auth::dicomweb_scopes::write = "dicomweb.write"
 
constexpr std::string_view kcenon::pacs::web::auth::dicomweb_scopes::delete_resource = "dicomweb.delete"
 

Detailed Description

OAuth 2.0 middleware for DICOMweb endpoint authorization.

Provides Bearer token extraction, JWT validation, scope-based access control, and integration with the existing RBAC system. When OAuth 2.0 is disabled, falls back to X-User-ID header authentication.

See also
RFC 6749 - OAuth 2.0 Authorization Framework
Issue #852 - Implement OAuth 2.0 authorization for DICOMweb endpoints
Author
kcenon
Since
1.0.0

Definition in file oauth2_middleware.h.