-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated tsm-api and tsm-rest-api to be compliant to BSI-TR-03165 TSMS…
… v1.0.3
- Loading branch information
Showing
64 changed files
with
13,919 additions
and
1,535 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@echo off | ||
|
||
echo. | ||
echo ##################### | ||
echo ### clean tsm-api ### | ||
echo ##################### | ||
echo. | ||
|
||
call mvn clean | ||
|
||
echo. | ||
|
||
pause |
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,26 @@ | ||
# Changelog | ||
Changelog file for BSI tsm-api. | ||
|
||
## [1.0.3] - 26.05.2023 | ||
* renamed method setCustomAccessToken to setAccessToken and added callback strategy for token creation | ||
|
||
## [1.0.2] - 05.04.2023 | ||
* the version of tsm-api (v1.0.2) is identical to v1.0.1, as there were no differences in the TSM-API specifications between BSI-TR-03165 v1.0.1 and v1.0.2 | ||
* the version number (v1.0.2) was only created to maintain consistency across BSI-TR-03165, tsm-api, and tsm-rest-api. | ||
|
||
## [1.0.1] - 14.02.2023 | ||
* modifications to be compliant to BSI TR-03165 v1.0.1: | ||
* added new method setCustomAccessToken | ||
* EErrorTypes: renamed INVALID_REQUEST to INVALID_ARGUMENT | ||
* EErrorTypes: renamed CONTENT_RELATED_ERROR to SECURE_COMPONENT_ERROR | ||
* EErrorTypes: renamed INVALID_STATE to NOT_ALLOWED | ||
* EErrorTypes: added new error types ALREADY_EXISTS, UNAUTHORIZED, ISSUER_ERROR, NOT_FOUND, OVERLOAD_PROTECTION, UNDER_MAINTENANCE | ||
* changed maven groupId and java package from de.bsi.tsms to de.bund.bsi.tsms | ||
* corrected spell issues | ||
* updated maven plugins to latest stable versions | ||
|
||
## [1.0.0] - 07.06.2022 | ||
* created project | ||
* compliant to BSI TR-03165 v1.0 | ||
|
||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
27 changes: 27 additions & 0 deletions
27
tsm-api/src/main/java/de/bund/bsi/tsms/tsmapi/ITsmAccessToken.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,27 @@ | ||
package de.bund.bsi.tsms.tsmapi; | ||
|
||
/** | ||
* The AccessToken is an optional interface to register a custom access token | ||
* for message authentication with TSM-Backend. The SP may provide an | ||
* implementation of the AccessToken and register it via the TSM-API method | ||
* {@link de.bund.bsi.tsms.tsmapi.ITsmApiService#setAccessToken}. When | ||
* registered, the TSM-API-SDK will call the method getToken of the AccessToken | ||
* to retrieve the authentication token for TSMS communication. The | ||
* {@link #getToken} method is called for each TSM-Backend request. Caching the | ||
* token and re-questing a new one when expired, must be implemented by the SP. | ||
* | ||
* @since 1.0.3 | ||
*/ | ||
public interface ITsmAccessToken { | ||
|
||
/** | ||
* Callback method called for each request to TSM-Backend. The implementation of | ||
* this interface handles token caching and token expiration. The access token | ||
* is only active, if the implementation is registered via TSM-API method | ||
* {@link de.bund.bsi.tsms.tsmapi.ITsmApiService#setAccessToken}. | ||
* | ||
* @return A currently valid token. | ||
*/ | ||
String getToken(); | ||
|
||
} |
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
50 changes: 50 additions & 0 deletions
50
tsm-api/src/main/java/de/bund/bsi/tsms/tsmapi/MockTsmAccessToken.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,50 @@ | ||
package de.bund.bsi.tsms.tsmapi; | ||
|
||
/** | ||
* This is a mock implementation of an {@link ITsmAccessToken}.<br> | ||
* <br> | ||
* It returns a static token string. | ||
* | ||
* @since 1.0.3 | ||
*/ | ||
public final class MockTsmAccessToken implements ITsmAccessToken { | ||
|
||
/** | ||
* Singleton instance. | ||
*/ | ||
private static MockTsmAccessToken instance = null; | ||
|
||
/** | ||
* Singleton constructor. Please use {@link #getInstance()}. | ||
*/ | ||
private MockTsmAccessToken() { | ||
} | ||
|
||
private synchronized void initInstance() { | ||
if (instance == null) { | ||
instance = new MockTsmAccessToken(); | ||
} | ||
} | ||
|
||
/** | ||
* Gets the singleton instance. | ||
* | ||
* @return Singleton instance. | ||
*/ | ||
public MockTsmAccessToken getInstance() { | ||
if (instance == null) { | ||
initInstance(); | ||
} | ||
return instance; | ||
} | ||
|
||
/** | ||
* Does nothing. | ||
* | ||
* @return Returns static string 'tokenSample'. | ||
*/ | ||
@Override | ||
public String getToken() { | ||
return "tokenSample"; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@echo off | ||
|
||
echo. | ||
echo ########################## | ||
echo ### clean tsm-rest-api ### | ||
echo ########################## | ||
echo. | ||
|
||
call mvn clean | ||
|
||
echo. | ||
|
||
pause |
Oops, something went wrong.