Skip to content

Commit 40a9baa

Browse files
committed
During Credentials and Basic Authentication set AuthResponse ReferrerUrl
1 parent 6158d21 commit 40a9baa

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

src/ServiceStack.ServiceInterface/Auth/BasicAuthProvider.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ public override object Authenticate(IServiceBase authService, IAuthSession sessi
3030
var userName = basicAuth.Value.Key;
3131
var password = basicAuth.Value.Value;
3232

33-
return Authenticate(authService, session, userName, password);
33+
return Authenticate(authService, session, userName, password, request.Continue);
3434
}
35+
36+
3537
}
3638
}

src/ServiceStack.ServiceInterface/Auth/CredentialsAuthProvider.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,15 @@ public override bool IsAuthorized(IAuthSession session, IOAuthTokens tokens, Aut
7171
public override object Authenticate(IServiceBase authService, IAuthSession session, Auth request)
7272
{
7373
new CredentialsAuthValidator().ValidateAndThrow(request);
74-
return Authenticate(authService, session, request.UserName, request.Password);
74+
return Authenticate(authService, session, request.UserName, request.Password, request.Continue);
7575
}
7676

7777
protected object Authenticate(IServiceBase authService, IAuthSession session, string userName, string password)
78+
{
79+
return Authenticate(authService, session, userName, password, string.Empty);
80+
}
81+
82+
protected object Authenticate(IServiceBase authService, IAuthSession session, string userName, string password, string referrerUrl)
7883
{
7984
if (!LoginMatchesSession(session, userName))
8085
{
@@ -92,6 +97,7 @@ protected object Authenticate(IServiceBase authService, IAuthSession session, st
9297
return new AuthResponse {
9398
UserName = userName,
9499
SessionId = session.Id,
100+
ReferrerUrl = referrerUrl
95101
};
96102
}
97103

0 commit comments

Comments
 (0)