SessionObserver

@available(iOS 12.0, *)
@objc(BDKSessionObserver)
public protocol SessionObserver

An observer of the Session object.

Classes conforming to this protocol will be notified when the session state changes

  • This method will be invoked when the session is about to start the authentication process

    Declaration

    Swift

    func sessionWillAuthenticate(_ session: Session)

    Parameters

    session

    The Session object.

  • This method will be invoked when the session has been authenticated.

    Declaration

    Swift

    func sessionDidAuthenticate(_ session: Session)

    Parameters

    session

    The Session object.

  • This method will be invoked when the session is about to request a new access token in order to refresh itself.

    Declaration

    Swift

    func sessionWillRefresh(_ session: Session)

    Parameters

    session

    The Session object.

  • This method will be invoked when the session has been refreshed

    Declaration

    Swift

    func sessionDidRefresh(_ session: Session)

    Parameters

    session

    The Session object.

  • This method will be invoked when the session fails because of an error

    Declaration

    Swift

    func session(_ session: Session, didFailWith error: Error)

    Parameters

    session

    The Session object.

    error

    The error occurred.