# `ExSaml.Subject`
[🔗](https://github.com/docJerem/ex_saml/blob/main/lib/ex_saml/subject.ex#L1)

The subject in a SAML 2.0 Assertion.

This is part of the `ExSaml.Assertion` struct. The `name` field in this struct should not
be used in any UI directly. It might be a temporary randomly generated
ID from IdP. `ExSaml` internally uses this to deal with IdP initiated logout requests.

If an authentication request was sent from `ExSaml` (SP initiated), the SAML response
is expected to include the original request ID. This ID is made available in
`ExSaml.Subject.in_response_to`.

If the authentication request originated from the IDP (IDP initiated), there won't
be a `ExSaml` request ID associated with it. The `ExSaml.Subject.in_response_to`
will be an empty string in that case.

# `t`

```elixir
@type t() :: %ExSaml.Subject{
  confirmation_method: atom(),
  in_response_to: String.t(),
  name: String.t(),
  name_format: :undefined | String.t(),
  name_qualifier: :undefined | String.t(),
  notonorafter: String.t(),
  sp_name_qualifier: :undefined | String.t()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
