Skip to content

Commit

Permalink
Misc (#66)
Browse files Browse the repository at this point in the history
* prepared changelog for release

* added one unit test case for attributes

* added copyright comment everywhere

* fixed changelog
  • Loading branch information
kristinapathak authored Oct 6, 2020
1 parent fa01ecb commit 9991ac5
Show file tree
Hide file tree
Showing 49 changed files with 796 additions and 5 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [v0.9.0]
- added helper function for building basic auth map [#59](https://github.com/xmidt-org/bascule/pull/59)
- fixed references to the main branch [#61](https://github.com/xmidt-org/bascule/pull/61)
- fixed attributes to be case sensitive and simplified the Attributes interface [#64](https://github.com/xmidt-org/bascule/pull/64)

## [v0.8.1]
- fixed data race in RemoteBearerTokenAcquirer [#55](https://github.com/xmidt-org/bascule/pull/55)
Expand Down Expand Up @@ -76,7 +79,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added constructor, enforcer, and listener alice decorators
- Basic code and structure established

[Unreleased]: https://github.com/xmidt-org/bascule/compare/v0.8.1...HEAD
[Unreleased]: https://github.com/xmidt-org/bascule/compare/v0.9.0...HEAD
[v0.9.0]: https://github.com/xmidt-org/bascule/compare/v0.8.1...v0.9.0
[v0.8.1]: https://github.com/xmidt-org/bascule/compare/v0.8.0...v0.8.1
[v0.8.0]: https://github.com/xmidt-org/bascule/compare/v0.7.0...v0.8.0
[v0.7.0]: https://github.com/xmidt-org/bascule/compare/v0.6.0...v0.7.0
Expand Down
4 changes: 2 additions & 2 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
comcast-bascule
Copyright 2019 Comcast Cable Communications Management, LLC
bascule
Copyright 2020 Comcast Cable Communications Management, LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# comcast-bascule
# bascule

The library for authorization: both acquiring and validating.

Expand Down
17 changes: 17 additions & 0 deletions acquire/auth.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright 2020 Comcast Cable Communications Management, LLC
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

// Package acquire is used for getting Auths to pass in http requests.
package acquire

Expand Down
17 changes: 17 additions & 0 deletions acquire/auth_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright 2020 Comcast Cable Communications Management, LLC
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package acquire

import (
Expand Down
17 changes: 17 additions & 0 deletions acquire/bearer.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright 2020 Comcast Cable Communications Management, LLC
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package acquire

import (
Expand Down
17 changes: 17 additions & 0 deletions acquire/bearer_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright 2020 Comcast Cable Communications Management, LLC
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package acquire

import (
Expand Down
17 changes: 17 additions & 0 deletions attributes.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright 2020 Comcast Cable Communications Management, LLC
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package bascule

import (
Expand Down
21 changes: 21 additions & 0 deletions attributes_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright 2020 Comcast Cable Communications Management, LLC
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package bascule

import (
Expand Down Expand Up @@ -75,6 +92,10 @@ func TestGetNestedAttribute(t *testing.T) {
description: "Missing Key Error",
keys: []string{"c", "b", "a"},
},
{
description: "Wrong Key Case Error",
keys: []string{"A", "B", "C"},
},
}
for _, tc := range tests {
t.Run(tc.description, func(t *testing.T) {
Expand Down
17 changes: 17 additions & 0 deletions basculehttp/constructor.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright 2020 Comcast Cable Communications Management, LLC
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package basculehttp

import (
Expand Down
17 changes: 17 additions & 0 deletions basculehttp/constructor_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright 2020 Comcast Cable Communications Management, LLC
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package basculehttp

import (
Expand Down
17 changes: 17 additions & 0 deletions basculehttp/enforcer.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright 2020 Comcast Cable Communications Management, LLC
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package basculehttp

import (
Expand Down
17 changes: 17 additions & 0 deletions basculehttp/enforcer_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright 2020 Comcast Cable Communications Management, LLC
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package basculehttp

import (
Expand Down
17 changes: 17 additions & 0 deletions basculehttp/errorResponseReason.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright 2020 Comcast Cable Communications Management, LLC
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package basculehttp

//go:generate stringer -type=ErrorResponseReason
Expand Down
17 changes: 17 additions & 0 deletions basculehttp/http.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright 2020 Comcast Cable Communications Management, LLC
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

// package basculehttp contains some basic http middleware (in the form of
// Alice-style decorators) that can be used to extract and parse a Token from
// an http header, validate the Token, and allow for the consumer to add
Expand Down
17 changes: 17 additions & 0 deletions basculehttp/http_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright 2020 Comcast Cable Communications Management, LLC
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package basculehttp

import (
Expand Down
17 changes: 17 additions & 0 deletions basculehttp/listener.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright 2020 Comcast Cable Communications Management, LLC
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package basculehttp

import (
Expand Down
17 changes: 17 additions & 0 deletions basculehttp/listener_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright 2020 Comcast Cable Communications Management, LLC
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package basculehttp

import (
Expand Down
17 changes: 17 additions & 0 deletions basculehttp/mocks_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright 2020 Comcast Cable Communications Management, LLC
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package basculehttp

import (
Expand Down
Loading

0 comments on commit 9991ac5

Please sign in to comment.