forked from eclipse-tractusx/managed-identity-wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Store credntial API, testcase mofitication based on DidDocument…
… Java POJO
- Loading branch information
1 parent
4939ddb
commit 569097b
Showing
14 changed files
with
614 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/main/java/org/eclipse/tractusx/managedidentitywallets/dao/entity/Credential.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* ******************************************************************************* | ||
* Copyright (c) 2021,2023 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* ****************************************************************************** | ||
*/ | ||
|
||
package org.eclipse.tractusx.managedidentitywallets.dao.entity; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
|
||
@Getter | ||
@Setter | ||
@Entity | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Builder | ||
public class Credential extends BaseEntity { | ||
|
||
|
||
@Id | ||
@JsonIgnore | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "id", columnDefinition = "serial", nullable = false, unique = true) | ||
private Long id; | ||
|
||
@Column(nullable = false) | ||
private Long holder; | ||
|
||
@Column(nullable = false) | ||
private Long issuer; | ||
|
||
@Column(nullable = false) | ||
private String type; | ||
|
||
@Column(nullable = false) | ||
private String data; | ||
} |
28 changes: 28 additions & 0 deletions
28
...java/org/eclipse/tractusx/managedidentitywallets/dao/repository/CredentialRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* ******************************************************************************* | ||
* Copyright (c) 2021,2023 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* ****************************************************************************** | ||
*/ | ||
|
||
package org.eclipse.tractusx.managedidentitywallets.dao.repository; | ||
|
||
import org.eclipse.tractusx.managedidentitywallets.dao.entity.Credential; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface CredentialRepository extends JpaRepository<Credential, Long> { | ||
} |
62 changes: 62 additions & 0 deletions
62
src/main/java/org/eclipse/tractusx/managedidentitywallets/exception/BadDataException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* ******************************************************************************* | ||
* Copyright (c) 2021,2023 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* ****************************************************************************** | ||
*/ | ||
|
||
package org.eclipse.tractusx.managedidentitywallets.exception; | ||
|
||
/** | ||
* The type Bad data exception. | ||
*/ | ||
public class BadDataException extends RuntimeException { | ||
|
||
/** | ||
* Instantiates a new Bad data exception. | ||
*/ | ||
public BadDataException() { | ||
} | ||
|
||
/** | ||
* Instantiates a new Bad data exception. | ||
* | ||
* @param message the message | ||
*/ | ||
public BadDataException(String message) { | ||
super(message); | ||
} | ||
|
||
/** | ||
* Instantiates a new Bad data exception. | ||
* | ||
* @param message the message | ||
* @param cause the cause | ||
*/ | ||
public BadDataException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
/** | ||
* Instantiates a new Bad data exception. | ||
* | ||
* @param cause the cause | ||
*/ | ||
public BadDataException(Throwable cause) { | ||
super(cause); | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
src/main/java/org/eclipse/tractusx/managedidentitywallets/exception/ForbiddenException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* ******************************************************************************* | ||
* Copyright (c) 2021,2023 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* ****************************************************************************** | ||
*/ | ||
|
||
package org.eclipse.tractusx.managedidentitywallets.exception; | ||
|
||
/** | ||
* The type Forbidden exception. | ||
*/ | ||
public class ForbiddenException extends RuntimeException { | ||
|
||
/** | ||
* Instantiates a new Forbidden exception. | ||
*/ | ||
public ForbiddenException() { | ||
} | ||
|
||
/** | ||
* Instantiates a new Forbidden exception. | ||
* | ||
* @param message the message | ||
*/ | ||
public ForbiddenException(String message) { | ||
super(message); | ||
} | ||
|
||
/** | ||
* Instantiates a new Forbidden exception. | ||
* | ||
* @param message the message | ||
* @param cause the cause | ||
*/ | ||
public ForbiddenException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
/** | ||
* Instantiates a new Forbidden exception. | ||
* | ||
* @param cause the cause | ||
*/ | ||
public ForbiddenException(Throwable cause) { | ||
super(cause); | ||
} | ||
} |
Oops, something went wrong.