{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/DataProtection/issues/122","repository_url":"https://api.github.com/repos/aspnet/DataProtection","labels_url":"https://api.github.com/repos/aspnet/DataProtection/issues/122/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/DataProtection/issues/122/comments","events_url":"https://api.github.com/repos/aspnet/DataProtection/issues/122/events","html_url":"https://github.com/aspnet/DataProtection/issues/122","id":136476604,"number":122,"title":"Remove ConfigureGlobalOptions or SetApplicationName from DataProtectionConfigurationExtensions","user":{"login":"javiercn","id":6995051,"avatar_url":"https://avatars.githubusercontent.com/u/6995051?v=3","gravatar_id":"","url":"https://api.github.com/users/javiercn","html_url":"https://github.com/javiercn","followers_url":"https://api.github.com/users/javiercn/followers","following_url":"https://api.github.com/users/javiercn/following{/other_user}","gists_url":"https://api.github.com/users/javiercn/gists{/gist_id}","starred_url":"https://api.github.com/users/javiercn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiercn/subscriptions","organizations_url":"https://api.github.com/users/javiercn/orgs","repos_url":"https://api.github.com/users/javiercn/repos","events_url":"https://api.github.com/users/javiercn/events{/privacy}","received_events_url":"https://api.github.com/users/javiercn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aspnet/DataProtection/labels/3%20-%20Done","name":"3 - Done","color":"CCCCCC"},{"url":"https://api.github.com/repos/aspnet/DataProtection/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"javiercn","id":6995051,"avatar_url":"https://avatars.githubusercontent.com/u/6995051?v=3","gravatar_id":"","url":"https://api.github.com/users/javiercn","html_url":"https://github.com/javiercn","followers_url":"https://api.github.com/users/javiercn/followers","following_url":"https://api.github.com/users/javiercn/following{/other_user}","gists_url":"https://api.github.com/users/javiercn/gists{/gist_id}","starred_url":"https://api.github.com/users/javiercn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiercn/subscriptions","organizations_url":"https://api.github.com/users/javiercn/orgs","repos_url":"https://api.github.com/users/javiercn/repos","events_url":"https://api.github.com/users/javiercn/events{/privacy}","received_events_url":"https://api.github.com/users/javiercn/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/aspnet/DataProtection/milestones/15","html_url":"https://github.com/aspnet/DataProtection/milestones/1.0.0-rc2","labels_url":"https://api.github.com/repos/aspnet/DataProtection/milestones/15/labels","id":1407632,"number":15,"title":"1.0.0-rc2","description":null,"creator":{"login":"muratg","id":1808428,"avatar_url":"https://avatars.githubusercontent.com/u/1808428?v=3","gravatar_id":"","url":"https://api.github.com/users/muratg","html_url":"https://github.com/muratg","followers_url":"https://api.github.com/users/muratg/followers","following_url":"https://api.github.com/users/muratg/following{/other_user}","gists_url":"https://api.github.com/users/muratg/gists{/gist_id}","starred_url":"https://api.github.com/users/muratg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muratg/subscriptions","organizations_url":"https://api.github.com/users/muratg/orgs","repos_url":"https://api.github.com/users/muratg/repos","events_url":"https://api.github.com/users/muratg/events{/privacy}","received_events_url":"https://api.github.com/users/muratg/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":5,"state":"open","created_at":"2015-11-12T00:51:32Z","updated_at":"2016-03-15T23:11:26Z","due_on":null,"closed_at":null},"comments":14,"created_at":"2016-02-25T18:52:42Z","updated_at":"2016-03-20T19:53:36Z","closed_at":"2016-03-15T23:11:26Z","body":"There are 3 ways right now to set the application name.\r\n\r\n```\r\nservices.AddDataProtection(options => options.ApplicationDiscriminator = \"name\");\r\nservices.AddDataProtection().SetApplicationName(\"name\");\r\nservices.AddDataProtection().ConfigureGlobalOptions(options => options.ApplicationDiscriminator = \"name\")\r\n```\r\n\r\nWe could get rid of the two last ones or just keep one of the two for non DI enabled scenarios. (A non DI enabled scenario would look like this)\r\n\r\n```\r\nDataProtectionProvider.Create(directory, builder => { builder.SetApplicationName(\"name\")}) or\r\nDataProtectionProvider.Create(\r\n    directory, \r\n    builder => { \r\n        builder.ConfigureGlobalOptions(options => options.ApplicationDiscriminator = \"name\")\r\n    })\r\n```\r\nIf we want to get rid of both methods, on a non DI scneario, the user only needs to write\r\n```\r\nDataProtectionProvider.Create(\r\n    directory, \r\n    builder => { \r\n        builder.Services.Configure<DataProtectionGlobalOptions>(options => options.ApplicationDiscriminator = \"name\")\r\n    })\r\n```\r\n\r\n**builder.Services.Configure<DataProtectionGlobalOptions>(options => options.ApplicationDiscriminator = \"name\")**\r\n\r\nIn my opinion this is not crazy and we can just get rid of those two methods."},"comment":{"url":"https://api.github.com/repos/aspnet/DataProtection/issues/comments/199005269","html_url":"https://github.com/aspnet/DataProtection/issues/122#issuecomment-199005269","issue_url":"https://api.github.com/repos/aspnet/DataProtection/issues/122","id":199005269,"user":{"login":"javiercn","id":6995051,"avatar_url":"https://avatars.githubusercontent.com/u/6995051?v=3","gravatar_id":"","url":"https://api.github.com/users/javiercn","html_url":"https://github.com/javiercn","followers_url":"https://api.github.com/users/javiercn/followers","following_url":"https://api.github.com/users/javiercn/following{/other_user}","gists_url":"https://api.github.com/users/javiercn/gists{/gist_id}","starred_url":"https://api.github.com/users/javiercn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiercn/subscriptions","organizations_url":"https://api.github.com/users/javiercn/orgs","repos_url":"https://api.github.com/users/javiercn/repos","events_url":"https://api.github.com/users/javiercn/events{/privacy}","received_events_url":"https://api.github.com/users/javiercn/received_events","type":"User","site_admin":false},"created_at":"2016-03-20T19:53:36Z","updated_at":"2016-03-20T19:53:36Z","body":"https://github.com/aspnet/DataProtection/blob/dev/src/Microsoft.AspNetCore.DataProtection/DataProtectionBuilderExtensions.cs#L35\r\n\r\nBoth changes went in at the same time. Maybe you are missing an using?\r\n\r\nI've checked my nuget package cache and 1.0.0-rc2-20269 contains the changes. You can search for DataProtectionBuilderExtensions on the assembly to be sure.\r\n\r\nLet me know if you still run into issues."}}