SessionCodec is an interface to convert SAML assertions to a Session. The default implementation uses JWTs, JWTSessionCodec.
| 54 | // SessionCodec is an interface to convert SAML assertions to a |
| 55 | // Session. The default implementation uses JWTs, JWTSessionCodec. |
| 56 | type SessionCodec interface { |
| 57 | // New creates a Session from the SAML assertion. |
| 58 | New(assertion *saml.Assertion) (Session, error) |
| 59 | |
| 60 | // Encode returns a serialized version of the Session. |
| 61 | // |
| 62 | // Note: When implementing this function, it is reasonable to expect that |
| 63 | // Session is of the exact type returned by New(), and panic if it is not. |
| 64 | Encode(s Session) (string, error) |
| 65 | |
| 66 | // Decode parses the serialized session that may have been returned by Encode |
| 67 | // and returns a Session. |
| 68 | Decode(string) (Session, error) |
| 69 | } |
| 70 | |
| 71 | type indexType int |
| 72 |
no outgoing calls
no test coverage detected