public AuthorizeModule( IAuthorizationEndpointService service, IErrorResponseBuilder errorResponseBuilder) : base(OAuth.Configuration.GetFullPath(x => x.AuthorizationRequestRoute)) { _service = service; _errorResponseBuilder = errorResponseBuilder; this.RequiresAuthentication(); Get["/", ctx => OAuth.IsEnabled] = _ => Index(); Post[OAuth.Configuration.AuthorizationAllowRoute, ctx => OAuth.IsEnabled] = _ => Allow(); Post[OAuth.Configuration.AuthorizationDenyRoute, ctx => OAuth.IsEnabled] = _ => Deny(); }
public void SetUp() { _service = new DefaultAuthorizationEndpointService(); }