All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.kinde.session.KindeSessionKindeTokenGuiceModule Maven / Gradle / Ivy

The newest version!
package com.kinde.session;

import com.google.inject.AbstractModule;
import com.google.inject.Provides;
import com.kinde.KindeClientSession;
import com.kinde.guice.KindeAnnotations;
import com.kinde.token.KindeToken;

public class KindeSessionKindeTokenGuiceModule extends AbstractModule {

    private KindeToken kindeToken;

    public KindeSessionKindeTokenGuiceModule(KindeToken kindeToken) {
        if (kindeToken == null) {
            throw new IllegalArgumentException("kindeToken cannot be null");
        }
        this.kindeToken = kindeToken;
    }

    @Provides
    @KindeAnnotations.KindeToken
    public KindeToken provideKindeToken() {
        return kindeToken;
    }


    @Override
    protected void configure() {
        bind(KindeClientSession.class).to(KindeClientKindeTokenSessionImpl.class);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy