Package org.sdase.commons.server.auth
Class AuthBundle.Builder<C extends io.dropwizard.Configuration>
- java.lang.Object
-
- org.sdase.commons.server.auth.AuthBundle.Builder<C>
-
- All Implemented Interfaces:
AuthBundle.AuthBuilder<C>
,AuthBundle.AuthorizationBuilder<C>
,AuthBundle.ProviderBuilder
- Enclosing class:
- AuthBundle<T extends io.dropwizard.Configuration>
public static class AuthBundle.Builder<C extends io.dropwizard.Configuration> extends java.lang.Object implements AuthBundle.ProviderBuilder, AuthBundle.AuthorizationBuilder<C>, AuthBundle.AuthBuilder<C>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthBundle<C>
build()
AuthBundle.AuthBuilder<C>
withAnnotatedAuthorization()
Configures the bundle to require valid tokens for all endpoints that are annotated with@PermitAll
.<T extends io.dropwizard.Configuration>
AuthBundle.AuthorizationBuilder<T>withAuthConfigProvider(AuthConfigProvider<T> authConfigProvider)
AuthBundle.AuthBuilder<C>
withExternalAuthorization()
Configures the bundle to validate tokens but also permit requests without Authorization header.AuthBundle.AuthBuilder<C>
withOpenTelemetry(io.opentelemetry.api.OpenTelemetry openTelemetry)
-
-
-
Method Detail
-
withAuthConfigProvider
public <T extends io.dropwizard.Configuration> AuthBundle.AuthorizationBuilder<T> withAuthConfigProvider(AuthConfigProvider<T> authConfigProvider)
- Specified by:
withAuthConfigProvider
in interfaceAuthBundle.ProviderBuilder
-
withAnnotatedAuthorization
public AuthBundle.AuthBuilder<C> withAnnotatedAuthorization()
Description copied from interface:AuthBundle.AuthorizationBuilder
Configures the bundle to require valid tokens for all endpoints that are annotated with@PermitAll
.- Specified by:
withAnnotatedAuthorization
in interfaceAuthBundle.AuthorizationBuilder<C extends io.dropwizard.Configuration>
- Returns:
- the builder
-
withExternalAuthorization
public AuthBundle.AuthBuilder<C> withExternalAuthorization()
Description copied from interface:AuthBundle.AuthorizationBuilder
Configures the bundle to validate tokens but also permit requests without Authorization header. Authorization decisions need be made separately e.g. by theOpaBundle
.- Specified by:
withExternalAuthorization
in interfaceAuthBundle.AuthorizationBuilder<C extends io.dropwizard.Configuration>
- Returns:
- the builder
-
withOpenTelemetry
public AuthBundle.AuthBuilder<C> withOpenTelemetry(io.opentelemetry.api.OpenTelemetry openTelemetry)
- Specified by:
withOpenTelemetry
in interfaceAuthBundle.AuthBuilder<C extends io.dropwizard.Configuration>
-
build
public AuthBundle<C> build()
- Specified by:
build
in interfaceAuthBundle.AuthBuilder<C extends io.dropwizard.Configuration>
-
-