Skip to content

Commit 635380d

Browse files
kevinchaletjerriep
authored andcommitted
React to API/naming changes in aspnet/Security
aspnet/Security@b189475 aspnet/Security@e091bce
1 parent 58bdf65 commit 635380d

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

generators/app/templates/AuthenticationDefaults.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ public static class <%= name %>AuthenticationDefaults {
1818
public const string AuthenticationScheme = "<%= name %>";
1919

2020
/// <summary>
21-
/// Default value for <see cref="OAuthOptions.Caption"/>.
21+
/// Default value for <see cref="OAuthOptions.DisplayName"/>.
2222
/// </summary>
23-
public const string Caption = "<%= name %>";
23+
public const string DisplayName = "<%= name %>";
2424

2525
/// <summary>
2626
/// Default value for <see cref="OAuthOptions.ClaimsIssuer"/>.

generators/app/templates/AuthenticationHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync([NotNull]
3737
// TODO: Add any optional claims, eg
3838
// .AddOptionalClaim("urn:<%= name.toLowerCase() %>:name", <%= name %>AuthenticationHelper.GetName(payload), Options.ClaimsIssuer)
3939

40-
var context = new OAuthAuthenticatedContext(Context, Options, Backchannel, tokens, payload) {
40+
var context = new OAuthCreatingTicketContext(Context, Options, Backchannel, tokens, payload) {
4141
Principal = new ClaimsPrincipal(identity),
4242
Properties = properties
4343
};
4444

45-
await Options.Events.Authenticated(context);
45+
await Options.Events.CreatingTicket(context);
4646

4747
if (context.Principal?.Identity == null) {
4848
return null;

generators/app/templates/AuthenticationOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace AspNet.Security.OAuth.<%= name %> {
1414
public class <%= name %>AuthenticationOptions : OAuthOptions {
1515
public <%= name %>AuthenticationOptions() {
1616
AuthenticationScheme = <%= name %>AuthenticationDefaults.AuthenticationScheme;
17-
Caption = <%= name %>AuthenticationDefaults.Caption;
17+
DisplayName = <%= name %>AuthenticationDefaults.DisplayName;
1818
ClaimsIssuer = <%= name %>AuthenticationDefaults.Issuer;
1919

2020
CallbackPath = new PathString(<%= name %>AuthenticationDefaults.CallbackPath);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "generator-aspnet-oauth",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "Yeoman generator for OAuth Providers for ASP.NET 5",
55
"license": "MIT",
66
"main": "app/index.js",

0 commit comments

Comments
 (0)