File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
src/Illuminate/Broadcasting Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -74,14 +74,42 @@ public function routes(array $attributes = null)
74
74
['get ' , 'post ' ], '/broadcasting/auth ' ,
75
75
'\\' .BroadcastController::class.'@authenticate '
76
76
)->withoutMiddleware ([\Illuminate \Foundation \Http \Middleware \VerifyCsrfToken::class]);
77
+ });
78
+ }
79
+
80
+ /**
81
+ * Register the routes for handling broadcast authentication.
82
+ *
83
+ * @param array|null $attributes
84
+ * @return void
85
+ */
86
+ public function userAuthenticationRoutes (array $ attributes = null )
87
+ {
88
+ if ($ this ->app instanceof CachesRoutes && $ this ->app ->routesAreCached ()) {
89
+ return ;
90
+ }
77
91
92
+ $ attributes = $ attributes ?: ['middleware ' => ['web ' ]];
93
+
94
+ $ this ->app ['router ' ]->group ($ attributes , function ($ router ) {
78
95
$ router ->match (
79
96
['get ' , 'post ' ], '/broadcasting/user-auth ' ,
80
97
'\\' .BroadcastController::class.'@authenticateUser '
81
98
)->withoutMiddleware ([\Illuminate \Foundation \Http \Middleware \VerifyCsrfToken::class]);
82
99
});
83
100
}
84
101
102
+ /**
103
+ * Alias for routes().
104
+ *
105
+ * @param array|null $attributes
106
+ * @return void
107
+ */
108
+ public function channelAuthorizationRoutes (array $ attributes = null )
109
+ {
110
+ return $ this ->routes ($ attributes );
111
+ }
112
+
85
113
/**
86
114
* Get the socket ID for the given request.
87
115
*
You can’t perform that action at this time.
0 commit comments