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

no.nav.brukerdialog.security.domain.OidcCredential Maven / Gradle / Ivy

There is a newer version: 1.2020.02.21_14.01-cdaccec525a6
Show newest version
package no.nav.brukerdialog.security.domain;

import javax.security.auth.DestroyFailedException;
import javax.security.auth.Destroyable;

public class OidcCredential implements Destroyable {
    private boolean destroyed;
    private String jwt;

    public OidcCredential(String jwt) {
        this.jwt = jwt;
    }

    public String getToken() {
        return jwt;
    }

    @Override
    public void destroy() throws DestroyFailedException {
        jwt = null;
        destroyed = true;
    }

    @Override
    public boolean isDestroyed() {
        return destroyed;
    }

    @Override
    public String toString() {
        if (destroyed) {
            return "OidcCredential[destroyed]";
        }
        return "OidcCredential[" + this.jwt + "]";
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy