<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>3. Controllers &amp; Routing on BeamFoundry Rays Fiber</title><link>https://rays.bfdy.dev/rays-fiber/docs/3-controllers/</link><description>Recent content in 3. Controllers &amp; Routing on BeamFoundry Rays Fiber</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://rays.bfdy.dev/rays-fiber/docs/3-controllers/index.xml" rel="self" type="application/rss+xml"/><item><title>Global &amp; Path Filters</title><link>https://rays.bfdy.dev/rays-fiber/docs/3-controllers/1-global-filters/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rays.bfdy.dev/rays-fiber/docs/3-controllers/1-global-filters/</guid><description>&lt;h1 id="global--path-filters"&gt;Global &amp;amp; Path Filters&lt;a class="anchor" href="#global--path-filters"&gt;&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;While embedding middlewares in &lt;code&gt;FiberController&lt;/code&gt; structs is great for endpoint-specific logic, sometimes you need to apply middlewares across your entire application or to broad URL prefixes.&lt;/p&gt;&#10;&lt;p&gt;For this, Rays Fiber provides the &lt;code&gt;FiberPathFilter&lt;/code&gt; stereotype.&lt;/p&gt;&#10;&lt;h2 id="the-fiberpathfilter-component"&gt;The &lt;code&gt;FiberPathFilter&lt;/code&gt; Component&lt;a class="anchor" href="#the-fiberpathfilter-component"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Unlike a Controller, a &lt;code&gt;FiberPathFilter&lt;/code&gt; is based on the standard Rays &lt;code&gt;Component&lt;/code&gt; stereotype. It does not define HTTP endpoints; its sole purpose is to register the middlewares embedded within it.&lt;/p&gt;</description></item><item><title>Web Security Integration</title><link>https://rays.bfdy.dev/rays-fiber/docs/3-controllers/2-security-integration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rays.bfdy.dev/rays-fiber/docs/3-controllers/2-security-integration/</guid><description>&lt;h1 id="web-security-integration"&gt;Web Security Integration&lt;a class="anchor" href="#web-security-integration"&gt;&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;Rays Fiber is designed to deeply integrate with the &lt;strong&gt;Rays Web Security&lt;/strong&gt; framework. When an &lt;code&gt;HttpSecurity&lt;/code&gt; object is configured for a specific server, it assumes control over authentication and authorization.&lt;/p&gt;&#10;&lt;h2 id="binding-httpsecurity-to-servers"&gt;Binding &lt;code&gt;HttpSecurity&lt;/code&gt; to Servers&lt;a class="anchor" href="#binding-httpsecurity-to-servers"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;By default, an &lt;code&gt;HttpSecurity&lt;/code&gt; beam returned by your configuration targets the &lt;code&gt;&amp;quot;primary&amp;quot;&lt;/code&gt; server.&lt;/p&gt;&#10;&lt;p&gt;To bind an &lt;code&gt;HttpSecurity&lt;/code&gt; object to a secondary server (e.g., &lt;code&gt;&amp;quot;admin-api&amp;quot;&lt;/code&gt;), you supply an anonymous struct as the &lt;em&gt;first argument&lt;/em&gt; to your configuration method, applying the &lt;code&gt;Server&lt;/code&gt; struct tag:&lt;/p&gt;</description></item></channel></rss>