using System; using System.Threading.Tasks; namespace Owin.Security.Providers.Box { /// /// Default implementation. /// public class BoxAuthenticationProvider : IBoxAuthenticationProvider { /// /// Initializes a /// public BoxAuthenticationProvider() { OnAuthenticated = context => Task.FromResult(null); OnReturnEndpoint = context => Task.FromResult(null); } /// /// Gets or sets the function that is invoked when the Authenticated method is invoked. /// public Func OnAuthenticated { get; set; } /// /// Gets or sets the function that is invoked when the ReturnEndpoint method is invoked. /// public Func OnReturnEndpoint { get; set; } /// /// Invoked whenever Box successfully authenticates a user /// /// Contains information about the login session as well as the user . /// A representing the completed operation. public virtual Task Authenticated(BoxAuthenticatedContext context) { return OnAuthenticated(context); } /// /// Invoked prior to the being saved in a local cookie and the browser being redirected to the originally requested URL. /// /// /// A representing the completed operation. public virtual Task ReturnEndpoint(BoxReturnEndpointContext context) { return OnReturnEndpoint(context); } } }