addStateListener

Registers a listener that is notified whenever the authentication state changes.

Return

A Closeable that, when closed, removes the listener.

Parameters

listener

A Consumer that receives DirectAuthenticationState updates.