Skip to content

Commit 17043eb

Browse files
committed
update set session with auth example using setSessionWithAuth method
1 parent a60ab60 commit 17043eb

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

example/src/main/scala/com/softwaremill/example/session/SetSessionTapir.scala

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,15 @@ object SetSessionTapir extends App with StrictLogging {
3939

4040
val login: ServerEndpoint[Any, Future] =
4141
setNewCsrfToken(checkHeader) {
42-
setSession(refreshable, usingCookies) {
43-
setSessionEndpoint {
44-
endpoint.securityIn(myAuth)
45-
}
42+
setSessionWithAuth(refreshable, usingCookies){
43+
myAuth
4644
}
45+
// equivalent to
46+
// setSession(refreshable, usingCookies) {
47+
// setSessionEndpoint {
48+
// endpoint.securityIn(myAuth)
49+
// }
50+
// }
4751
}.post
4852
.in("api")
4953
.in("do_login")

0 commit comments

Comments
 (0)