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

net.oauth2.client.TokenChangeObserver Maven / Gradle / Ivy

The newest version!
/* 
 * Copyright (c) 2017 Georgi Pavlov ([email protected]).
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the MIT license which accompanies 
 * this distribution, and is available at 
 * https://github.com/tengia/oauth-2/blob/master/LICENSE
 */

package net.oauth2.client;

import net.oauth2.AccessToken;
import net.oauth2.TemporalAccessToken;

/**
 * Functional interface for listeners to asynchronous (push) provisioning of
 * Access Token update events.
 *
 * @param 
 */
@FunctionalInterface
public interface TokenChangeObserver {

	/**
	 * Fired by {@link TokenChangeObservable} when a token value has changed,
	 * either because it was fetched for the first time, or because it was
	 * refreshed.
	 * 
	 * @param newToken
	 * @param oldToken
	 */
	public void tokenChanged(TemporalAccessToken newToken, TemporalAccessToken oldToken);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy