DefaultSessionCodec returns the default SessionCodec for the provided options, a JWTSessionCodec configured to issue signed tokens.
(opts Options)
| 36 | // DefaultSessionCodec returns the default SessionCodec for the provided options, |
| 37 | // a JWTSessionCodec configured to issue signed tokens. |
| 38 | func DefaultSessionCodec(opts Options) JWTSessionCodec { |
| 39 | return JWTSessionCodec{ |
| 40 | SigningMethod: defaultJWTSigningMethod, |
| 41 | Audience: opts.URL.String(), |
| 42 | Issuer: opts.URL.String(), |
| 43 | MaxAge: defaultSessionMaxAge, |
| 44 | Key: opts.Key, |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | // DefaultSessionProvider returns the default SessionProvider for the provided options, |
| 49 | // a CookieSessionProvider configured to store sessions in a cookie. |