diff --git a/src/Microsoft.AspNet.Security/Authorization/IAuthorizationPolicy.cs b/src/Microsoft.AspNet.Security/Authorization/IAuthorizationPolicy.cs deleted file mode 100644 index 8100ae32f1..0000000000 --- a/src/Microsoft.AspNet.Security/Authorization/IAuthorizationPolicy.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. - -using System.Threading.Tasks; -namespace Microsoft.AspNet.Security.Authorization -{ - public interface IAuthorizationPolicy - { - int Order { get; set; } - Task ApplyingAsync(AuthorizationPolicyContext context); - Task ApplyAsync(AuthorizationPolicyContext context); - Task AppliedAsync(AuthorizationPolicyContext context); - } -} diff --git a/src/Microsoft.AspNet.Security/Authorization/AuthorizationPolicy.cs b/src/Microsoft.AspNet.Security/AuthorizationPolicy.cs similarity index 96% rename from src/Microsoft.AspNet.Security/Authorization/AuthorizationPolicy.cs rename to src/Microsoft.AspNet.Security/AuthorizationPolicy.cs index 505f873aac..157b71047a 100644 --- a/src/Microsoft.AspNet.Security/Authorization/AuthorizationPolicy.cs +++ b/src/Microsoft.AspNet.Security/AuthorizationPolicy.cs @@ -19,7 +19,7 @@ using System.Collections.Generic; using System.Security.Claims; using System.Threading.Tasks; -namespace Microsoft.AspNet.Security.Authorization +namespace Microsoft.AspNet.Security { /// /// This class provides a base implementation for diff --git a/src/Microsoft.AspNet.Security/Authorization/AuthorizationPolicyContext.cs b/src/Microsoft.AspNet.Security/AuthorizationPolicyContext.cs similarity index 71% rename from src/Microsoft.AspNet.Security/Authorization/AuthorizationPolicyContext.cs rename to src/Microsoft.AspNet.Security/AuthorizationPolicyContext.cs index fabc41d05d..4055fddbd8 100644 --- a/src/Microsoft.AspNet.Security/Authorization/AuthorizationPolicyContext.cs +++ b/src/Microsoft.AspNet.Security/AuthorizationPolicyContext.cs @@ -1,10 +1,25 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Open Technologies, Inc. +// All Rights Reserved +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING +// WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF +// TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR +// NON-INFRINGEMENT. +// See the Apache 2 License for the specific language governing +// permissions and limitations under the License. using System.Collections.Generic; using System.Security.Claims; using System.Linq; -namespace Microsoft.AspNet.Security.Authorization +namespace Microsoft.AspNet.Security { /// /// Contains authorization information used by . diff --git a/src/Microsoft.AspNet.Security/Authorization/AuthorizationServiceExtensions.cs b/src/Microsoft.AspNet.Security/AuthorizationServiceExtensions.cs similarity index 79% rename from src/Microsoft.AspNet.Security/Authorization/AuthorizationServiceExtensions.cs rename to src/Microsoft.AspNet.Security/AuthorizationServiceExtensions.cs index 70d52bf8d1..158314a155 100644 --- a/src/Microsoft.AspNet.Security/Authorization/AuthorizationServiceExtensions.cs +++ b/src/Microsoft.AspNet.Security/AuthorizationServiceExtensions.cs @@ -1,4 +1,19 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Open Technologies, Inc. +// All Rights Reserved +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING +// WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF +// TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR +// NON-INFRINGEMENT. +// See the Apache 2 License for the specific language governing +// permissions and limitations under the License. using System; using System.Collections.Generic; @@ -6,7 +21,7 @@ using System.Linq; using System.Security.Claims; using System.Threading.Tasks; -namespace Microsoft.AspNet.Security.Authorization +namespace Microsoft.AspNet.Security { public static class AuthorizationServiceExtensions { diff --git a/src/Microsoft.AspNet.Security/Authorization/DefaultAuthorizationService.cs b/src/Microsoft.AspNet.Security/DefaultAuthorizationService.cs similarity index 82% rename from src/Microsoft.AspNet.Security/Authorization/DefaultAuthorizationService.cs rename to src/Microsoft.AspNet.Security/DefaultAuthorizationService.cs index 544caac07f..1292901522 100644 --- a/src/Microsoft.AspNet.Security/Authorization/DefaultAuthorizationService.cs +++ b/src/Microsoft.AspNet.Security/DefaultAuthorizationService.cs @@ -1,4 +1,19 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Open Technologies, Inc. +// All Rights Reserved +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING +// WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF +// TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR +// NON-INFRINGEMENT. +// See the Apache 2 License for the specific language governing +// permissions and limitations under the License. using System; using System.Collections.Generic; @@ -6,7 +21,7 @@ using System.Linq; using System.Security.Claims; using System.Threading.Tasks; -namespace Microsoft.AspNet.Security.Authorization +namespace Microsoft.AspNet.Security { public class DefaultAuthorizationService : IAuthorizationService { diff --git a/src/Microsoft.AspNet.Security/IAuthorizationPolicy.cs b/src/Microsoft.AspNet.Security/IAuthorizationPolicy.cs new file mode 100644 index 0000000000..395549065a --- /dev/null +++ b/src/Microsoft.AspNet.Security/IAuthorizationPolicy.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Open Technologies, Inc. +// All Rights Reserved +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING +// WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF +// TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR +// NON-INFRINGEMENT. +// See the Apache 2 License for the specific language governing +// permissions and limitations under the License. + +using System.Threading.Tasks; + +namespace Microsoft.AspNet.Security +{ + public interface IAuthorizationPolicy + { + int Order { get; set; } + Task ApplyingAsync(AuthorizationPolicyContext context); + Task ApplyAsync(AuthorizationPolicyContext context); + Task AppliedAsync(AuthorizationPolicyContext context); + } +} diff --git a/src/Microsoft.AspNet.Security/Authorization/IAuthorizationService.cs b/src/Microsoft.AspNet.Security/IAuthorizationService.cs similarity index 76% rename from src/Microsoft.AspNet.Security/Authorization/IAuthorizationService.cs rename to src/Microsoft.AspNet.Security/IAuthorizationService.cs index 30284e4c54..cbd705c8fa 100644 --- a/src/Microsoft.AspNet.Security/Authorization/IAuthorizationService.cs +++ b/src/Microsoft.AspNet.Security/IAuthorizationService.cs @@ -1,10 +1,25 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Open Technologies, Inc. +// All Rights Reserved +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING +// WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF +// TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR +// NON-INFRINGEMENT. +// See the Apache 2 License for the specific language governing +// permissions and limitations under the License. using System.Collections.Generic; using System.Security.Claims; using System.Threading.Tasks; -namespace Microsoft.AspNet.Security.Authorization +namespace Microsoft.AspNet.Security { /// /// Checks claims based permissions for a user. diff --git a/src/Microsoft.AspNet.Security/Microsoft.AspNet.Security.kproj b/src/Microsoft.AspNet.Security/Microsoft.AspNet.Security.kproj index 37943b7510..fa845e638d 100644 --- a/src/Microsoft.AspNet.Security/Microsoft.AspNet.Security.kproj +++ b/src/Microsoft.AspNet.Security/Microsoft.AspNet.Security.kproj @@ -25,10 +25,12 @@ - - - - + + + + + + diff --git a/test/Microsoft.AspNet.Security.Test/DefaultAuthorizationServiceTests.cs b/test/Microsoft.AspNet.Security.Test/DefaultAuthorizationServiceTests.cs index 9c36c54bf6..7d439897b4 100644 --- a/test/Microsoft.AspNet.Security.Test/DefaultAuthorizationServiceTests.cs +++ b/test/Microsoft.AspNet.Security.Test/DefaultAuthorizationServiceTests.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Security.Claims; using System.Threading.Tasks; -using Microsoft.AspNet.Security.Authorization; +using Microsoft.AspNet.Security; using Xunit; namespace Microsoft.AspNet.Security.Test diff --git a/test/Microsoft.AspNet.Security.Test/FakePolicy.cs b/test/Microsoft.AspNet.Security.Test/FakePolicy.cs index a3bdf8c1f9..3e365cde2b 100644 --- a/test/Microsoft.AspNet.Security.Test/FakePolicy.cs +++ b/test/Microsoft.AspNet.Security.Test/FakePolicy.cs @@ -1,6 +1,6 @@ using System; using System.Threading.Tasks; -using Microsoft.AspNet.Security.Authorization; +using Microsoft.AspNet.Security; namespace Microsoft.AspNet.Security.Test {