Make loadSessionFromString private

This commit is contained in:
Joel Speed 2019-05-16 17:06:13 +01:00
parent bae865f880
commit cf1a9c819d
No known key found for this signature in database
GPG Key ID: 6E80578D6751DEFB

View File

@ -94,15 +94,15 @@ func (store *SessionStore) Load(req *http.Request) (*sessions.SessionState, erro
if !ok { if !ok {
return nil, fmt.Errorf("Cookie Signature not valid") return nil, fmt.Errorf("Cookie Signature not valid")
} }
session, err := store.LoadSessionFromString(val) session, err := store.loadSessionFromString(val)
if err != nil { if err != nil {
return nil, fmt.Errorf("error loading session: %s", err) return nil, fmt.Errorf("error loading session: %s", err)
} }
return session, nil return session, nil
} }
// LoadSessionFromString loads the session based on the ticket value // loadSessionFromString loads the session based on the ticket value
func (store *SessionStore) LoadSessionFromString(value string) (*sessions.SessionState, error) { func (store *SessionStore) loadSessionFromString(value string) (*sessions.SessionState, error) {
ticket, err := decodeTicket(store.CookieOptions.CookieName, value) ticket, err := decodeTicket(store.CookieOptions.CookieName, value)
if err != nil { if err != nil {
return nil, err return nil, err