<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Cuong Ta on Medium]]></title>
        <description><![CDATA[Stories by Cuong Ta on Medium]]></description>
        <link>https://medium.com/@cuongta?source=rss-71fe493332bb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Tx3FEF96uwNP7_UYCCygnA.jpeg</url>
            <title>Stories by Cuong Ta on Medium</title>
            <link>https://medium.com/@cuongta?source=rss-71fe493332bb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 14:44:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cuongta/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Gotchas: Calling methods on a nil type]]></title>
            <link>https://medium.com/@cuongta/gotchas-calling-methods-on-a-nil-type-76e4e587217e?source=rss-71fe493332bb------2</link>
            <guid isPermaLink="false">https://medium.com/p/76e4e587217e</guid>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[rust]]></category>
            <dc:creator><![CDATA[Cuong Ta]]></dc:creator>
            <pubDate>Wed, 12 Feb 2025 02:46:52 GMT</pubDate>
            <atom:updated>2025-02-12T03:04:40.082Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*_msR1QXnJ0_lWpla7DTnzQ.png" /><figcaption><a href="https://github.com/egonelbre/gophers">https://github.com/egonelbre/gophers</a></figcaption></figure><p>There are some interesting gotchas in Go that is different from other languages. This one is pretty interesting. Go allows pointer receiver methods on a nil type to be called. This post is not meant to deter people from using Go. This is simply to share some tips so less people don’t have to find out this the hard way. I think Go a great language, I’ve used it for many years and still love it. Without furter ado,</p><pre>package main<br><br>import &quot;fmt&quot;<br><br>type MyStuct struct {<br> value string<br>}<br><br>func (m *MyStuct) MethodCall() {<br>   fmt.Printf(&quot;%+v&quot;, m.value)<br>}<br><br>func main() {<br>   var m *MyStuct<br>   m.MethodCall() // panic because m is nil<br>}</pre><p>This code will panic because m is nil.</p><pre>panic: runtime error: invalid memory address or nil pointer dereference<br>[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x10032223c]</pre><p>This is a little counter intuitive because this behavior is different in most other languages, ie. Rust, Python, Java.</p><pre>struct MyStruct {<br>    value: String<br>}<br><br>impl MyStruct {<br>    fn some_method(&amp;self) {<br>        println!(&quot;{:?}&quot;, self.value);<br>    }<br>}<br><br>fn main() {<br>    let m: Option&lt;MyStruct&gt; = None;<br>    <br>    match m {<br>        Some(ref n) =&gt; n.some_method(),<br>        None =&gt; println!(&quot;m is None&quot;),<br>    }<br><br>    m.map(|n|n.some_method());<br>}</pre><p>In Rust, naturally this is disallowed. Rust also has a type called Option&lt;T&gt; to remind you the type that you’re dealing it, and the borrow checker will make sure your code is compiler safe.</p><pre>class MyStruct:<br>    def __init__(self, value):<br>        self.value = value<br><br>    def send(self):<br>        print(self.value)<br><br>m = None<br><br>try:<br>    m.send() // disallow, even IDE catch this<br>except AttributeError as e:<br>    print(&quot;Error: {e}&quot;)</pre><p>In Python, this is disallowed and free IDE can catch this.</p><p>According to ChatGPT, the reasons that this behavior exists is that:</p><ol><li>Helps Implement Optional or Lazy Initialization</li></ol><pre>type Config struct {<br>    Value string<br>}<br><br>func (c *Config) GetValue() string {<br>    if c == nil {<br>        return &quot;default&quot;<br>    }<br>    return c.Value<br>}<br><br>func main() {<br>    var cfg *Config // nil<br>    fmt.Println(cfg.GetValue()) // &quot;default&quot;<br>}</pre><p>2. Consistency with Interface Methods</p><pre>type Printer interface {<br>    Print()<br>}<br><br>type MyPrinter struct{}<br><br>func (p *MyPrinter) Print() {<br>    fmt.Println(&quot;Printing...&quot;)<br>}<br><br>func main() {<br>    var p *MyPrinter // nil<br>    var printer Printer = p<br>    printer.Print()  // No panic, prints &quot;Printing...&quot;<br>}</pre><p>3. Flexibility for the method receiver to handle nil.</p><p>Please take these ChatGPT answers with a grain of salt, but I feel these reasons are pretty weak compared to the problems that may arise because someone may accidentally set the object to nil, and all of a sudden the methods that access inner fields will all panic. Rule of thumb, is to always check the pointer receiver for nil before accessing its fields.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76e4e587217e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create a Kafka cluster locally using Docker Compose]]></title>
            <link>https://medium.com/@cuongta/how-to-create-a-kafka-cluster-locally-using-docker-compose-99abe9df7104?source=rss-71fe493332bb------2</link>
            <guid isPermaLink="false">https://medium.com/p/99abe9df7104</guid>
            <dc:creator><![CDATA[Cuong Ta]]></dc:creator>
            <pubDate>Fri, 09 Aug 2024 07:18:51 GMT</pubDate>
            <atom:updated>2024-08-19T06:11:52.030Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*tXi0yWOvV9AbZmJZtdN1vg.jpeg" /></figure><h3>What is Kafka?</h3><p>Kafka is a distributed, highly performant, fault-tolerant, and scalable message bus. It scales horizontally by adding more brokers and partitions, making it suitable for large-scale data pipelines. Kafka is ideal for event streaming, real-time analytics, log aggregation, and building distributed data pipelines. It’s commonly used in big data and microservice architectures.</p><p>In order to see Kafka in action, it’s best to create a cluster locally. We’ll setup a simple 3-broker Kakfa cluster with Zookeeper, create a topic and produce and consume some messages using Docker Compose.</p><h3>Docker Compose</h3><p>Using docker-compose is ideal for this scenario because it’s reproducible and easier to bring up and manage different services such as Zookeeper and 3 cluster brokers.</p><p>If you don’t have Docker installed <a href="https://docs.docker.com/engine/install/">https://docs.docker.com/engine/install/</a></p><p>Here’s the docker-compose.yaml, you can add more brokers as you wish.</p><pre>services:<br>  zookeeper:<br>    image: confluentinc/cp-zookeeper:latest<br>    environment:<br>      ZOOKEEPER_CLIENT_PORT: 2181<br>      ZOOKEEPER_TICK_TIME: 2000<br>    ports:<br>      - 2181:2181<br>    <br>  kafka1:<br>    image: confluentinc/cp-kafka:latest<br>    depends_on:<br>      - zookeeper<br>    ports:<br>      - 9092:9092<br>      - 29092:29092<br>    environment:<br>      KAFKA_BROKER_ID: 1<br>      KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181<br>      KAFKA_ADVERTISED_LISTENERS: EXTERNAL://localhost:9092,INTERNAL://kafka1:29092<br>      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT<br>      KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL<br>      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1<br>  kafka2:<br>    image: confluentinc/cp-kafka:latest<br>    depends_on:<br>      - zookeeper<br>    ports:<br>      - 9093:9093<br>      - 29093:29093<br>    environment:<br>      KAFKA_BROKER_ID: 2<br>      KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181<br>      KAFKA_ADVERTISED_LISTENERS: EXTERNAL://localhost:9093,INTERNAL://kafka2:29093<br>      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT<br>      KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL<br>      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1<br>  kafka3:<br>    image: confluentinc/cp-kafka:latest<br>    depends_on:<br>      - zookeeper<br>    ports:<br>      - 9094:9094<br>      - 29094:29094<br>    environment:<br>      KAFKA_BROKER_ID: 3<br>      KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181<br>      KAFKA_ADVERTISED_LISTENERS: EXTERNAL://localhost:9094,INTERNAL://kafka3:29094<br>      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT<br>      KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL<br>      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1</pre><p>KAFKA_BROKER_ID — identifies the broker identity in the cluster.<br>KAFKA_ZOOKEEPER_CONNECT — defines where the Zookeeper is located<br>KAFKA_ADVERTISED_LISTENERS — defines the internal port that’s used by brokers to intercommunicate, and the external port that’s advertised and passed back to the consumers/producers.<br>KAFKA_LISTENER_SECURITY_PROTOCOL_MAP — defines the security protocol for the listener. For simplicity I used PLAINTEXT for both.<br>KAFKA_INTER_BROKER_LISTENER_NAME — defines the inter broker listener name.<br>KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR — defines replication factor for the internal __consumer_offset topic used by Kafka to store offsets of messages consumed by each consumer group.</p><h3>Start the cluster</h3><p>Once that’s all defined, we can start up the cluster. Inside the same directory as the docker-compose.yaml file.</p><pre>docker compose up</pre><h3>Check the cluster</h3><p>To get an overview of the cluster we just created, let’s use Kafkacat or kcat. Kafka also come with a script that you use to describe the cluster.</p><p>On mac, install kcat using brew</p><pre>brew install kcat</pre><p>Now run this command to list the cluster using any one of the broker client port.</p><pre>$ kcat -b localhost:9092 -L<br>Metadata for all topics (from broker 1: localhost:9092/1):<br> 3 brokers:<br>  broker 2 at localhost:9093<br>  broker 3 at localhost:9094<br>  broker 1 at localhost:9092 (controller)</pre><p>As you can see kcat has discovered the cluster just by connecting to one of the broker, localhost:9092. The controller is a special broker and is responsible for managing the overall health and operation of the Kafka cluster, such as leader election, partition management and state changes.</p><p>If you have topics, it’ll be listed at the bottom.</p><p>Let’s create a topic.</p><h3>Create a topic</h3><p>You’ll need to download some Kafka scripts from Apache Kafka <a href="https://kafka.apache.org/downloads">https://kafka.apache.org/downloads</a></p><p>I downloaded the “Source downloads” option as it’s the smallest compared to the other options. Run tar xzvf to untargz the file into a directory. Inside the directory, look for the bin directory that contains all the useful kafka scripts, namely:</p><pre>kafka-console-consumer.sh<br>kafka-console-producer.sh<br>kafka-topics.sh<br>...</pre><p>We’ll use the kafka-topics.sh to create a topic.</p><pre>kafka-topics.sh --bootstrap-server localhost:9092 \<br>  --create --topic stats \<br>  --replication-factor 3 --partitions 2</pre><ul><li>A topic is a logical group of messages, like a queue or channel.</li><li>Partition is how messages are internally grouped together.</li><li>Replication factor is the number of replicas for a partition.</li></ul><p>After the topic is created, we can see the partitions and replicas using kcat</p><pre>$ kcat -b localhost:9092 -t stats -L<br>Metadata for stats (from broker 1: localhost:9092/1):<br> 3 brokers:<br>  broker 2 at localhost:9093<br>  broker 3 at localhost:9094<br>  broker 1 at localhost:9092 (controller)<br> 1 topics:<br>  topic &quot;stats&quot; with 2 partitions:<br>    partition 0, leader 2, replicas: 2,3,1, isrs: 2,3,1<br>    partition 1, leader 3, replicas: 3,1,2, isrs: 3,1,2</pre><h3>Consume/produce some messages:</h3><p>We’ll need to create two terminal sessions/tab to mimic a consumer and producer.</p><p>On one tab, we’ll run this command to consume.</p><pre>kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic stats</pre><p>On another tab, we’ll run this command to produce.</p><pre>kafka-console-producer.sh --broker-list localhost:9092 --topic stats</pre><p>If you things are working fine, you can type something in the producer tab and see output on the consumer tab.</p><pre>kafka-console-producer.sh --broker-list localhost:9092 --topic stats<br>&gt; hello world<br>&gt; <br><br>kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic stats<br>hello world</pre><p>That’s it, hope it helps someone out there trying to setup a Kafka cluster using Docker Compose. Thanks</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99abe9df7104" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to encode and decode JWT using Rust]]></title>
            <link>https://medium.com/@cuongta/how-to-encode-and-decode-jwt-using-rust-51f3b757e212?source=rss-71fe493332bb------2</link>
            <guid isPermaLink="false">https://medium.com/p/51f3b757e212</guid>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[jwt]]></category>
            <dc:creator><![CDATA[Cuong Ta]]></dc:creator>
            <pubDate>Thu, 09 May 2024 07:19:11 GMT</pubDate>
            <atom:updated>2024-05-11T01:51:51.354Z</atom:updated>
            <content:encoded><![CDATA[<p>A few weeks ago, I had a Rust project that needed me to work with JSON Web Token (JWT) in Rust. I thought I’d document and share what I have learned and how it compared to Python.</p><h3>What is a JWT?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*C96cIUHpYSJMitN6mnRjfw.png" /></figure><p>Here’s a great intro: <a href="https://jwt.io/introduction">https://jwt.io/introduction</a><br>For this tutorial, we’ll only be talking about JWT and not <strong>JSON Web Encryption (JWE)</strong>. If there’s good feedbacks, I can create a post on JWE.</p><p>In Python, it’s pretty straightforward to create a JWT. The code itself is only 1 line. <a href="https://pyjwt.readthedocs.io/en/stable/">https://pyjwt.readthedocs.io/en/stable/</a></p><pre>encoded_jwt = jwt.encode({&quot;some&quot;: &quot;payload&quot;}, &quot;secret&quot;, algorithm=&quot;HS256&quot;)</pre><p>In Rust, it’ll require much more than just 1 line of code, let’s take a look.</p><h3>Encode JWT</h3><p>We’ll use the <a href="https://crates.io/crates/jsonwebtoken">jsonwebtoken</a> crates for this tutorial to creat the JWT and serde crate in order to help serialize the claim.</p><pre>Cargo.toml<br>jsonwebtoken = “9.3.0”<br>serde = { version = “1.0.201”, features = [“derive”] }</pre><h3>Claim</h3><p>Because Rust is a static typed language so we’ll need to define a claim type. The struct is flexible so you can define any field that you want to serialize/deserialize. There’s also public claims that you can define in your struct:</p><ul><li>iss (issuer): Issuer of the JWT.</li><li>sub (subject): Subject of the JWT (the user).</li><li>aud (audience): The JWT intended recipient or audience.</li><li>exp (expiration time): The time the JWT expires.</li><li>nbf (not before policy): Identifies the time before which JWT can not be accepted into processing.</li><li>iat (issued at time): Identifies the time at which the JWT was issued. This can be used to establish the age of the JWT or the exact time the token was generated.</li><li>jti (JWT ID): Unique identifier; this can be used to prevent the JWT from being used more than once.</li></ul><p><a href="https://www.iana.org/assignments/jwt/jwt.xhtml">https://www.iana.org/assignments/jwt/jwt.xhtml</a>.</p><pre>use serde::{Deserialize, Serialize};<br><br>#[derive(Deserialize, Serialize, Debug)]<br>struct Claims {<br>    custom_claim: String,<br>    iss: String,<br>    sub: String,<br>    aud: String,<br>    exp: u64,<br>}</pre><h3>Header</h3><p>For the heater, we’ll use HS256, since it’s the most popular algorithm. It&#39;s also the default Header.jsonwebtoken::Header::default()</p><h3>Signature</h3><p>For the signature, we’ll need to create a secret. Typically this comes from the config file but simplicity and without adding more than what’s needed to explain the concept, we’ll use “secret”.</p><pre>// create exp time<br>let now_plus_60 = std::time::SystemTime::now()<br>    .checked_add(time::Duration::from_secs(60))<br>    .unwrap()<br>    .duration_since(UNIX_EPOCH)<br>    .unwrap()<br>    .as_secs();<br><br>// create the claim<br>let c = Claims {<br>    custom_claim: &quot;&quot;.to_owned(),<br>    iss: &quot;http://www.example.com&quot;.to_owned(),<br>    sub: &quot;name of claim&quot;.to_owned(),<br>    exp: now_plus_60,<br>    aud: &quot;John Smith&quot;.to_owned(),<br>};<br><br>// create the header<br>let header = jsonwebtoken::Header::default();<br><br>// create the encoding key using the secret string<br>let secret = jsonwebtoken::EncodingKey::from_secret(&quot;secret&quot;.as_bytes());<br><br>// encode token<br>let res = jsonwebtoken::encode(&amp;header, &amp;c, &amp;secret).unwrap();<br>println!(&quot;{:?}&quot;, res);</pre><p>This creates the token:</p><blockquote>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjdXN0b21fY2xhaW0iOiIiLCJpc3MiOiJodHRwOi8vd3d3LmV4YW1wbGUuY29tIiwic3ViIjoibmFtZSBvZiBjbGFpbSIsImF1ZCI6IkpvaG4gU21pdGgiLCJleHAiOjE3MTUyMzY5OTh9.JBYBpaxE8fZJP3rUMCcKy46J9jljWEWhO5qUwIIhfwA</blockquote><h3>Decode JWT</h3><p>Now that we’ve encoded the token, let’s do the reverse and decode the token.</p><p>In Python, this can be done like so, without any validation:</p><pre>jwt.decode(encoded_jwt, &quot;secret&quot;, algorithms=[&quot;HS256&quot;])<br>{&#39;some&#39;: &#39;payload&#39;}</pre><p>In Rust, this can be done like so, also without any validation.</p><pre>let mut validation = jsonwebtoken::Validation::new(jsonwebtoken::Algorithm::HS256);<br>// skip exp validation, which is on by default<br>validation.required_spec_claims = HashSet::new();<br><br>// skip aud validation<br>validation.validate_aud = false;<br><br>// decode token<br>let res = jsonwebtoken::decode::&lt;Claims&gt;(&amp;res, &amp;dec_secret, &amp;validation);<br>println!(&quot;res {:?}&quot;, res);<br><br>// token result<br>Ok(TokenData { header: Header { typ: Some(&quot;JWT&quot;), alg: HS256, cty: None, jku: None, jwk: None, kid: None, x5u: None, x5c: None, x5t: None, x5t_s256: None }, claims: Claims { custom_claim: &quot;&quot;, iss: &quot;http://www.example.com&quot;, sub: &quot;name of claim&quot;, aud: &quot;John Smith&quot;, exp: 1715238166 } })</pre><p>You can also just decode just the payload.</p><pre>#[derive(Serialize, Deserialize, Debug)]<br>struct Claim {<br>    sub: String,<br>    name: String,<br>    iat: u64,<br>}<br>...<br><br>let token = &quot;eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c&quot;;<br>let parts = token.split(&quot;.&quot;).collect::&lt;Vec&lt;&amp;str&gt;&gt;();<br>let payload = parts.get(1).unwrap();<br>let decoded = base64::engine::general_purpose::STANDARD_NO_PAD<br>    .decode(*payload)<br>    .unwrap();<br> let claim = serde_json::from_slice::&lt;Claim&gt;(&amp;decoded).unwrap();<br>    dbg!(claim);</pre><p>By default, decode will attempt perform validation, so in order to just decode without validation we’ll need to configure validation to ignore them.</p><p>Here’s how to validate the claim. Please note that this will validate the aud value and the exp, so if the token exp time has elapsed than we’ll get the expired token error.</p><pre>let mut validation = jsonwebtoken::Validation::new(jsonwebtoken::Algorithm::HS256);<br>// config to validate the aud<br>validation.set_audience(&amp;vec![&quot;John Smith&quot;]);<br><br>// decode token<br>let res = jsonwebtoken::decode::&lt;Claims&gt;(&amp;res, &amp;dec_secret, &amp;validation);<br>println!(&quot;res {:?}&quot;, res);<br><br>// token result<br>Ok(TokenData { header: Header { typ: Some(&quot;JWT&quot;), alg: HS256, cty: None, jku: None, jwk: None, kid: None, x5u: None, x5c: None, x5t: None, x5t_s256: None }, claims: Claims { custom_claim: &quot;&quot;, iss: &quot;http://www.example.com&quot;, sub: &quot;name of claim&quot;, aud: &quot;John Smith&quot;, exp: 1715238166 } })</pre><h3>TL;DR</h3><pre>// ENCODE<br>// create exp time<br>let now_plus_60 = std::time::SystemTime::now()<br>    .checked_add(time::Duration::from_secs(60))<br>    .unwrap()<br>    .duration_since(UNIX_EPOCH)<br>    .unwrap()<br>    .as_secs();<br><br>// create the claim<br>let c = Claims {<br>    custom_claim: &quot;&quot;.to_owned(),<br>    iss: &quot;http://www.example.com&quot;.to_owned(),<br>    sub: &quot;name of claim&quot;.to_owned(),<br>    exp: now_plus_60,<br>    aud: &quot;John Smith&quot;.to_owned(),<br>};<br><br>// create the header<br>let header = jsonwebtoken::Header::default();<br><br>// create the encoding key using the secret string<br>let secret = jsonwebtoken::EncodingKey::from_secret(&quot;secret&quot;.as_bytes());<br><br>// encode token<br>let res = jsonwebtoken::encode(&amp;header, &amp;c, &amp;secret).unwrap();<br>println!(&quot;{:?}&quot;, res);<br><br>// DECODE<br>let mut validation = jsonwebtoken::Validation::new(jsonwebtoken::Algorithm::HS256);<br>// config to validate the aud<br>validation.set_audience(&amp;vec![&quot;John Smith&quot;]);<br><br>// decode token<br>let res = jsonwebtoken::decode::&lt;Claims&gt;(&amp;res, &amp;dec_secret, &amp;validation);<br>println!(&quot;res {:?}&quot;, res);<br><br>// token result<br>Ok(TokenData { header: Header { typ: Some(&quot;JWT&quot;), alg: HS256, cty: None, jku: None, jwk: None, kid: None, x5u: None, x5c: None, x5t: None, x5t_s256: None }, claims: Claims { custom_claim: &quot;&quot;, iss: &quot;http://www.example.com&quot;, sub: &quot;name of claim&quot;, aud: &quot;John Smith&quot;, exp: 1715238166 } })</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51f3b757e212" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>