package com.atlassian.bitbucket.mesh.credentials;

import javax.annotation.Nonnull;

/**
 * Credentials to be supplied when authenticating with a remote server.
 */
public interface Credentials {

    /**
     * Causes the supplied visitor to visit these credentials in a type-safe fashion
     *
     * @param visitor the {@link CredentialsVisitor} to visit credentials
     * @param <T> the type of the result
     * @return the return value of the invoked visit method
     */
    <T> T accept(@Nonnull CredentialsVisitor<T> visitor);
}
