robe-auth/src/main/java/io/robe/auth/token/TokenAuthBundle.java
@Override
    public void run(T configuration, Environment environment) throws Exception {
        this.configuration = configuration.getAuth();
        environment.jersey().register(new TokenFactoryProvider.Binder<Credentials>(Credentials.class));
        environment.jersey().register(new TokenBasedAuthResponseFilter(configuration.getAuth()));
        environment.jersey().register(TokenFeature.class);
        BasicToken.configure(configuration.getAuth());

        if(configuration.getAuth().getAlgorithm() != null) {
            checkCryptography(this.configuration);
        }

        environment.jersey().register(new SecurityHeadersFilter(configuration.getAuth()));
    }
@Override
    public void run(T configuration, Environment environment) throws Exception {
        this.configuration = configuration.getAuth();
        environment.jersey().register(new TokenFactoryProvider.Binder<Credentials>(Credentials.class));
        environment.jersey().register(new TokenBasedAuthResponseFilter(configuration.getAuth()));
        environment.jersey().register(TokenFeature.class);
        BasicToken.configure(configuration.getAuth());

        if(configuration.getAuth().getAlgorithm() != null) {
            checkCryptography(this.configuration);
        }

        environment.jersey().register(new SecurityHeadersFilter(configuration.getAuth()));
    }
@ Override public void run ( T configuration , Environment environment ) throws Exception { this . configuration = configuration . getAuth ( ) ; environment . jersey ( ) . register ( new TokenFactoryProvider . Binder < Credentials > ( Credentials . class ) ) ; environment . jersey ( ) . register ( new TokenBasedAuthResponseFilter ( configuration . getAuth ( ) ) ) ; environment . jersey ( ) . register ( TokenFeature . class ) ; BasicToken . configure ( configuration . getAuth ( ) ) ; if ( configuration . getAuth ( ) . getAlgorithm ( ) != null ) { checkCryptography ( this . configuration ) ; } environment . jersey ( ) . register ( new SecurityHeadersFilter ( configuration . getAuth ( ) ) ) ; }
Initializes the environment.

@param configuration the configuration object
@param environment   the service's {@link io.dropwizard.setup.Environment}
@throws Exception if something goes wrong
Initializes the environment .