#### [Abblix\.SecurityEvents](https://www.abblix.com/en/docs/api/abblix-securityevents 'index')
### [Abblix\.SecurityEvents](https://www.abblix.com/en/docs/api/abblix-securityevents/Abblix.SecurityEvents 'Abblix\.SecurityEvents')

## SecurityEventToken Class

A Security Event Token \(SET\): a JWT whose claims describe one or more aspects of a security
event that occurred to a subject \(RFC 8417 Section 2\)\. This type is a typed view over the
underlying [JsonWebToken](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonWebToken 'Abblix\.Jwt\.JsonWebToken'), naming the claims the SET profile gives meaning to\.

```csharp
public sealed class SecurityEventToken
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → SecurityEventToken

### Remarks
The view asserts nothing about conformance\. Whether a given token IS a valid SET \- carries the
right "typ", a non\-empty "events" claim, no "exp" \- is the validation pipeline's verdict, not
a property of this wrapper: a token read off the wire keeps whatever shape it arrived in until
validated\. [SecurityEventTokenBuilder](https://www.abblix.com/en/docs/api/abblix-securityevents/Abblix.SecurityEvents.SecurityEventTokenBuilder 'Abblix\.SecurityEvents\.SecurityEventTokenBuilder') produces conformant instances by
construction\.
### Constructors

## SecurityEventToken\(JsonWebToken\) Constructor {#Abblix.SecurityEvents.SecurityEventToken.SecurityEventToken(Abblix.Jwt.JsonWebToken)}

A Security Event Token \(SET\): a JWT whose claims describe one or more aspects of a security
event that occurred to a subject \(RFC 8417 Section 2\)\. This type is a typed view over the
underlying [JsonWebToken](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonWebToken 'Abblix\.Jwt\.JsonWebToken'), naming the claims the SET profile gives meaning to\.

```csharp
public SecurityEventToken(Abblix.Jwt.JsonWebToken token);
```
#### Parameters

###### `token` [JsonWebToken](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonWebToken 'Abblix\.Jwt\.JsonWebToken') {#Abblix.SecurityEvents.SecurityEventToken.SecurityEventToken(Abblix.Jwt.JsonWebToken).token}

The token to view\. Its claims are read in place, never copied\.

### Remarks
The view asserts nothing about conformance\. Whether a given token IS a valid SET \- carries the
right "typ", a non\-empty "events" claim, no "exp" \- is the validation pipeline's verdict, not
a property of this wrapper: a token read off the wire keeps whatever shape it arrived in until
validated\. [SecurityEventTokenBuilder](https://www.abblix.com/en/docs/api/abblix-securityevents/Abblix.SecurityEvents.SecurityEventTokenBuilder 'Abblix\.SecurityEvents\.SecurityEventTokenBuilder') produces conformant instances by
construction\.
### Fields

## SecurityEventToken\.TokenType Field {#Abblix.SecurityEvents.SecurityEventToken.TokenType}

The "typ" header value declaring a JWT to be a SET\. RFC 8417 Section 2\.3 registers the
"application/secevent\+jwt" media type and, per RFC 7515 Section 4\.1\.9, recommends omitting
the "application/" prefix in the header, so the value used SHOULD be "secevent\+jwt"\.
An alias into the core's shared registry, kept here because the value is a property of
THIS token type and reads that way at call sites\.

```csharp
public const string TokenType = "secevent+jwt";
```

#### Field Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')
### Properties

## SecurityEventToken\.Audiences Property {#Abblix.SecurityEvents.SecurityEventToken.Audiences}

The "aud" claim: the audiences the SET is intended for\. RECOMMENDED \(RFC 8417 Section 2\.2\)\.

```csharp
public System.Collections.Generic.IEnumerable<string> Audiences { get; }
```

#### Property Value
[System\.Collections\.Generic\.IEnumerable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1 'System\.Collections\.Generic\.IEnumerable\`1')[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1 'System\.Collections\.Generic\.IEnumerable\`1')

## SecurityEventToken\.Events Property {#Abblix.SecurityEvents.SecurityEventToken.Events}

The "events" claim: the event statements this SET expresses, keyed by event identifier URI\.
Null when the claim is absent or is not a JSON object \- a shape for the validation pipeline
to reject, not for this view to repair\.

```csharp
public Abblix.SecurityEvents.EventsCollection? Events { get; }
```

#### Property Value
[EventsCollection](https://www.abblix.com/en/docs/api/abblix-securityevents/Abblix.SecurityEvents.EventsCollection 'Abblix\.SecurityEvents\.EventsCollection')

### Remarks
The view is a read\-through wrapper cached per underlying node, so repeated reads cost
nothing and a claim replaced wholesale still yields a fresh view over the new node\.

## SecurityEventToken\.IssuedAt Property {#Abblix.SecurityEvents.SecurityEventToken.IssuedAt}

The "iat" claim: when the SET was issued\. REQUIRED \(RFC 8417 Section 2\.2\)\. Null on a token
the validation pipeline has passed means the claim is absent, which the pipeline refuses; on
a token constructed outside it, null may also mean a value the payload cannot read\.

```csharp
public System.Nullable<System.DateTimeOffset> IssuedAt { get; }
```

#### Property Value
[System\.Nullable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.nullable-1 'System\.Nullable\`1')[System\.DateTimeOffset](https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset 'System\.DateTimeOffset')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.nullable-1 'System\.Nullable\`1')

## SecurityEventToken\.Issuer Property {#Abblix.SecurityEvents.SecurityEventToken.Issuer}

The "iss" claim: the service provider publishing the SET\. REQUIRED \(RFC 8417 Section 2\.2\),
and not necessarily the issuer of the security subject \- the two coincide only when a
profile says so\.

```csharp
public string? Issuer { get; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

## SecurityEventToken\.JwtId Property {#Abblix.SecurityEvents.SecurityEventToken.JwtId}

The "jti" claim: the SET's unique identifier, unique within a particular event feed, by
which a recipient can tell a redelivery from a new event\. REQUIRED \(RFC 8417 Section 2\.2\)\.

```csharp
public string? JwtId { get; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

## SecurityEventToken\.Subject Property {#Abblix.SecurityEvents.SecurityEventToken.Subject}

The "sub" claim: the principal the SET is about\. OPTIONAL \(RFC 8417 Section 2\.2\) \- many
profiles identify the subject inside the event payload instead, which is where the Subject
Identifiers of RFC 9493 live\.

```csharp
public string? Subject { get; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

## SecurityEventToken\.TimeOfEvent Property {#Abblix.SecurityEvents.SecurityEventToken.TimeOfEvent}

The "toe" claim: when the event itself occurred, as opposed to when the SET about it was
issued\. OPTIONAL \(RFC 8417 Section 2\.2\): by omitting it, the issuer declines to share an
event time, and the value may be approximate where a profile says so\. Null on a token a
pipeline including [TimeOfEventStep](https://www.abblix.com/en/docs/api/abblix-securityevents/Abblix.SecurityEvents.Validation.Steps.TimeOfEventStep 'Abblix\.SecurityEvents\.Validation\.Steps\.TimeOfEventStep') has passed means exactly
that omission, since that step refuses a value it cannot read; on a token constructed outside
such a pipeline, null may also mean such a value\.

```csharp
public System.Nullable<System.DateTimeOffset> TimeOfEvent { get; }
```

#### Property Value
[System\.Nullable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.nullable-1 'System\.Nullable\`1')[System\.DateTimeOffset](https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset 'System\.DateTimeOffset')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.nullable-1 'System\.Nullable\`1')

## SecurityEventToken\.Token Property {#Abblix.SecurityEvents.SecurityEventToken.Token}

The underlying JWT, for everything the SET profile does not name: header parameters,
profile\-specific envelope claims, serialization\.

```csharp
public Abblix.Jwt.JsonWebToken Token { get; }
```

#### Property Value
[JsonWebToken](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonWebToken 'Abblix\.Jwt\.JsonWebToken')

## SecurityEventToken\.TransactionId Property {#Abblix.SecurityEvents.SecurityEventToken.TransactionId}

The "txn" claim: a transaction identifier correlating this SET with other JWTs issued for
the same transaction\. OPTIONAL \(RFC 8417 Section 2\.2\)\.

```csharp
public string? TransactionId { get; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')
### Methods

## SecurityEventToken\.GetSubjectId\(JsonSerializerOptions\) Method {#Abblix.SecurityEvents.SecurityEventToken.GetSubjectId(System.Text.Json.JsonSerializerOptions)}

Reads the "sub\_id" claim: the Subject Identifier of the principal the SET is about
\(RFC 9493 Section 4\.2\)\. Null when the claim is absent\.

```csharp
public Abblix.SecurityEvents.Subjects.SubjectIdentifier? GetSubjectId(System.Text.Json.JsonSerializerOptions? serializerOptions=null);
```
#### Parameters

###### `serializerOptions` [System\.Text\.Json\.JsonSerializerOptions](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.jsonserializeroptions 'System\.Text\.Json\.JsonSerializerOptions') {#Abblix.SecurityEvents.SecurityEventToken.GetSubjectId(System.Text.Json.JsonSerializerOptions).serializerOptions}

Options whose converters extend the RFC 9493 registered formats, typically a
[SubjectIdentifierJsonConverter](https://www.abblix.com/en/docs/api/abblix-securityevents/Abblix.SecurityEvents.Subjects.SubjectIdentifierJsonConverter 'Abblix\.SecurityEvents\.Subjects\.SubjectIdentifierJsonConverter') built with a profile's custom\-formats map;
null reads the registered formats alone\.

#### Returns
[SubjectIdentifier](https://www.abblix.com/en/docs/api/abblix-securityevents/Abblix.SecurityEvents.Subjects.SubjectIdentifier 'Abblix\.SecurityEvents\.Subjects\.SubjectIdentifier')

#### Exceptions

[System\.Text\.Json\.JsonException](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.jsonexception 'System\.Text\.Json\.JsonException')  
The claim is present but is not a Subject Identifier the options understand\.

### Remarks
A method rather than a property, because interpreting the claim is real work whose outcome
depends on the options: a profile teaching the converter extra Identifier Formats passes
them here, and a document naming a format the options do not know fails as malformed
rather than being repaired \- the same posture the rest of this view takes\.
