Skip to content

Commit

Permalink
Add copyright headers (#36)
Browse files Browse the repository at this point in the history
Signed-off-by: aziz.karabashov <[email protected]>
  • Loading branch information
akarabashov authored Oct 3, 2024
1 parent f97e3df commit 526b22a
Show file tree
Hide file tree
Showing 19 changed files with 76 additions and 0 deletions.
4 changes: 4 additions & 0 deletions generate/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2024 DSR Corporation, Denver, Colorado.
// https://www.dsr-corporation.com
// SPDX-License-Identifier: Apache-2.0

#![allow(unused)]

use std::error::Error as StdError;
Expand Down
4 changes: 4 additions & 0 deletions generate/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2024 DSR Corporation, Denver, Colorado.
// https://www.dsr-corporation.com
// SPDX-License-Identifier: Apache-2.0

mod error;
mod types;
mod utils;
Expand Down
4 changes: 4 additions & 0 deletions generate/src/types/cli.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2024 DSR Corporation, Denver, Colorado.
// https://www.dsr-corporation.com
// SPDX-License-Identifier: Apache-2.0

use clap::Parser;
use serde::Serialize;

Expand Down
4 changes: 4 additions & 0 deletions generate/src/types/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2024 DSR Corporation, Denver, Colorado.
// https://www.dsr-corporation.com
// SPDX-License-Identifier: Apache-2.0

pub mod settings;
pub mod specification;
pub mod cli;
4 changes: 4 additions & 0 deletions generate/src/types/settings.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2024 DSR Corporation, Denver, Colorado.
// https://www.dsr-corporation.com
// SPDX-License-Identifier: Apache-2.0

use std::path::PathBuf;
use serde::{Deserialize, Serialize};
use serde_yaml::Value;
Expand Down
4 changes: 4 additions & 0 deletions generate/src/types/specification.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2024 DSR Corporation, Denver, Colorado.
// https://www.dsr-corporation.com
// SPDX-License-Identifier: Apache-2.0

use crate::utils::generate::generate_jsonpath_from_tagged_values;
use serde::{Deserialize, Serialize};
use serde_yaml::Value;
Expand Down
4 changes: 4 additions & 0 deletions generate/src/utils/funcs.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2024 DSR Corporation, Denver, Colorado.
// https://www.dsr-corporation.com
// SPDX-License-Identifier: Apache-2.0

use std::collections::HashSet;
use std::path::PathBuf;

Expand Down
4 changes: 4 additions & 0 deletions generate/src/utils/generate.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2024 DSR Corporation, Denver, Colorado.
// https://www.dsr-corporation.com
// SPDX-License-Identifier: Apache-2.0

use serde_yaml::Value;
use crate::error::Result;

Expand Down
4 changes: 4 additions & 0 deletions generate/src/utils/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
// Copyright (c) 2024 DSR Corporation, Denver, Colorado.
// https://www.dsr-corporation.com
// SPDX-License-Identifier: Apache-2.0

pub mod generate;
pub mod funcs;
4 changes: 4 additions & 0 deletions src/disclosure.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2024 DSR Corporation, Denver, Colorado.
// https://www.dsr-corporation.com
// SPDX-License-Identifier: Apache-2.0

use crate::utils::{base64_hash, base64url_encode};
#[cfg(not(feature = "mock_salts"))]
use crate::utils::generate_salt;
Expand Down
4 changes: 4 additions & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2024 DSR Corporation, Denver, Colorado.
// https://www.dsr-corporation.com
// SPDX-License-Identifier: Apache-2.0

pub type Result<T> = ::core::result::Result<T, Error>;

#[derive(Debug, thiserror::Error, strum::IntoStaticStr)]
Expand Down
4 changes: 4 additions & 0 deletions src/holder.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2024 DSR Corporation, Denver, Colorado.
// https://www.dsr-corporation.com
// SPDX-License-Identifier: Apache-2.0

use crate::{error, SDJWTJson, SDJWTSerializationFormat};
use error::{Error, Result};
use jsonwebtoken::{Algorithm, EncodingKey, Header};
Expand Down
4 changes: 4 additions & 0 deletions src/issuer.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2024 DSR Corporation, Denver, Colorado.
// https://www.dsr-corporation.com
// SPDX-License-Identifier: Apache-2.0

use crate::{error, SDJWTJson};
use error::Result;
use std::collections::{HashMap, VecDeque};
Expand Down
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2024 DSR Corporation, Denver, Colorado.
// https://www.dsr-corporation.com
// SPDX-License-Identifier: Apache-2.0

use crate::error::Error;
use crate::utils::{base64_hash, base64url_decode, jwt_payload_decode};

Expand Down
4 changes: 4 additions & 0 deletions src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2024 DSR Corporation, Denver, Colorado.
// https://www.dsr-corporation.com
// SPDX-License-Identifier: Apache-2.0

use crate::error;
use crate::error::Error;
use crate::error::Error::DeserializationError;
Expand Down
4 changes: 4 additions & 0 deletions src/verifier.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2024 DSR Corporation, Denver, Colorado.
// https://www.dsr-corporation.com
// SPDX-License-Identifier: Apache-2.0

use crate::SDJWTSerializationFormat;
use crate::error::Error;
use crate::error::Result;
Expand Down
4 changes: 4 additions & 0 deletions tests/demos.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2024 DSR Corporation, Denver, Colorado.
// https://www.dsr-corporation.com
// SPDX-License-Identifier: Apache-2.0

use crate::utils::fixtures::{
ADDRESS_CLAIMS, ADDRESS_ONLY_STRUCTURED_JSONPATH, ADDRESS_ONLY_STRUCTURED_ONE_OPEN_JSONPATH,
ARRAYED_CLAIMS, ARRAYED_CLAIMS_JSONPATH, COMPLEX_EIDAS_CLAIMS, COMPLEX_EIDAS_JSONPATH,
Expand Down
4 changes: 4 additions & 0 deletions tests/utils/fixtures.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2024 DSR Corporation, Denver, Colorado.
// https://www.dsr-corporation.com
// SPDX-License-Identifier: Apache-2.0

pub const ISSUER_KEY: &str = "-----BEGIN PRIVATE KEY-----\nMIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgUr2bNKuBPOrAaxsR\nnbSH6hIhmNTxSGXshDSUD1a1y7ihRANCAARvbx3gzBkyPDz7TQIbjF+ef1IsxUwz\nX1KWpmlVv+421F7+c1sLqGk4HUuoVeN8iOoAcE547pJhUEJyf5Asc6pP\n-----END PRIVATE KEY-----\n";
pub const ISSUER_PUBLIC_KEY: &str = "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEb28d4MwZMjw8+00CG4xfnn9SLMVM\nM19SlqZpVb/uNtRe/nNbC6hpOB1LqFXjfIjqAHBOeO6SYVBCcn+QLHOqTw==\n-----END PUBLIC KEY-----\n";
pub const HOLDER_KEY: &str = "-----BEGIN PRIVATE KEY-----\nMIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg5K5SCos8zf9zRemG\nGUl6yfok+/NiiryNZsvANWMhF+KhRANCAARMIARHX1m+7c4cXiPhbi99JWgcg/Ug\nuKUOWzu8J4Z6Z2cY4llm2TEBh1VilUOIW0iIq7FX7nnAhOreI0/Rdh2U\n-----END PRIVATE KEY-----\n";
Expand Down
4 changes: 4 additions & 0 deletions tests/utils/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2024 DSR Corporation, Denver, Colorado.
// https://www.dsr-corporation.com
// SPDX-License-Identifier: Apache-2.0

#![allow(unused)]

pub mod fixtures;

0 comments on commit 526b22a

Please sign in to comment.