MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / encode

Method encode

chirpstack/src/api/auth/claims.rs:48–54  ·  view source on GitHub ↗
(&self, secret: &[u8])

Source from the content-addressed store, hash-verified

46 }
47
48 pub fn encode(&self, secret: &[u8]) -> Result<String> {
49 Ok(encode(
50 &Header::default(),
51 self,
52 &EncodingKey::from_secret(secret),
53 )?)
54 }
55
56 pub fn decode(token: &str, secret: &[u8]) -> Result<Self> {
57 let mut val = Validation::new(Algorithm::HS256);

Callers 15

from_uplink_eventMethod · 0.45
uplink_eventMethod · 0.45
join_eventMethod · 0.45
ack_eventMethod · 0.45
txack_eventMethod · 0.45
log_eventMethod · 0.45
status_eventMethod · 0.45
location_eventMethod · 0.45
create_sas_tokenFunction · 0.45
uplink_eventMethod · 0.45
join_eventMethod · 0.45
ack_eventMethod · 0.45

Calls 1

encodeFunction · 0.50

Tested by 1

test_for_userFunction · 0.36