Skip to content

Commit 58d2dbc

Browse files
committed
Update "NewMemoryAttributeStore"
1 parent eefe139 commit 58d2dbc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/sp/memorystore.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ type MemoryAttributeStore struct {
1414
store *ccache.Cache[samlsp.Attributes]
1515
}
1616

17-
func NewMemoryAttributeStore(ttl time.Duration) (*MemoryAttributeStore, error) {
17+
func NewMemoryAttributeStore(ttl time.Duration) *MemoryAttributeStore {
1818
return &MemoryAttributeStore{
1919
store: ccache.New(ccache.Configure[samlsp.Attributes]()),
20-
}, nil
20+
}
2121
}
2222

2323
func (s *MemoryAttributeStore) Get(id string) (samlsp.Attributes, error) {

pkg/sp/sp.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func NewServiceProvider(cert, key string, root *url.URL, options ...ServiceProvi
6767

6868
// set default store with a 1-hour TTL
6969
if serviceProvider.store == nil {
70-
serviceProvider.store, _ = NewMemoryAttributeStore(time.Hour * 1)
70+
serviceProvider.store = NewMemoryAttributeStore(time.Hour * 1)
7171
}
7272

7373
// samlsp options

0 commit comments

Comments
 (0)