Sitelet https://github.com/api-dev/ServiceStack/commit/4e775661f5c42fe1527e9658c6675d2ff2b3f9f9
Skip to content

Commit 4e77566

Browse files
committed
Add JWT/ApiKey authproviders to AuthWebTests
1 parent 521f88e commit 4e77566

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

‎tests/ServiceStack.AuthWeb.Tests/AppHost.cs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ private void ConfigureAuth(Container container)
134134
// ? HttpResult.Redirect("https://youtu.be/dQw4w9WgXcQ")
135135
// : null
136136
},
137+
new JwtAuthProvider(appSettings),
138+
new ApiKeyAuthProvider(appSettings),
137139
new TwitterAuthProvider(appSettings), //Sign-in with Twitter
138140
new FacebookAuthProvider(appSettings), //Sign-in with Facebook
139141
new DigestAuthProvider(appSettings), //Sign-in with Digest Auth

‎tests/ServiceStack.AuthWeb.Tests/Web.config‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@
6161
<add key="oauth.Odnoklassniki.ApplicationId" value="1089990656" />
6262
<add key="oauth.Odnoklassniki.PublicKey" value="CBABPIPBEBABABABA" />
6363
<add key="oauth.Odnoklassniki.SecretKey" value="B268138DF0BE3919FB1BBED8" />
64+
65+
<add key="jwt.AuthKeyBase64" value="w85nuoW3GxKFpfG7YTmG2f1Lslcl3k5AFEOxvyi2EGM=" />
66+
<add key="jwt.RequireSecureConnection" value="false" />
67+
<add key="apikey.RequireSecureConnection" value="false" />
6468
</appSettings>
6569
<!--
6670
For a description of web.config changes for .NET 4.5 see http://go.microsoft.com/fwlink/?LinkId=235367.

‎tests/ServiceStack.AuthWeb.Tests/default.cshtml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@
116116
<input type="text" name="Password" value="test"/>
117117
<input type="submit"/>
118118
</form>
119-
119+
120120
<h3>Private Auth</h3>
121121
<form action="/privateauth">
122122
<input type="text" name="Username" value="demis.bellot@gmail.com"/>
123123
<input type="submit"/>
124124
</form>
125-
125+
126126
<h3>Register New User</h3>
127127
<form action="/register" method="POST">
128128
<input type="text" name="Username" placeholder="UserName" value="NewUser"/>
@@ -139,6 +139,9 @@
139139
<h3>Lock all Users</h3>
140140
<a href="/lockallusers">/lockallusers</a>
141141

142+
<h3>Convert Session to token</h3>
143+
<a href="/session-to-token">/session-to-token</a>
144+
142145
<h3>Logout</h3>
143146
<a href="/auth/logout">/auth/logout</a>
144147
</div>

0 commit comments

Comments
 (0)