This repository was archived by the owner on Jun 5, 2025. It is now read-only.
Commit aa21fa1
committed
Standardize the authentication process for different VCert clients
The way that the Authetication can be acchieved is not standardized
and that depends completely if the client will be a VCertClient or
a VCertTknClient or for this last mentioned even if the accessToken
was provided or user&password.
For VCertTknClient exists 2 ways to have the client ready to use.
The first one is when the access token is provided; then it will
required to set it to an Authentication object which will be set to
the Config that will be passed to the VCertTknClient Constructor.
The second one is when the user and password is provided, then firstly
it will be required to create the VCertTknClient object with a Config
object with the Authentication object set and after that those
values will be set to an Authentication object that will be passed as
argument to the VCertTknClient.getAccessToken(Authentication) method.
For VCertClient, no matter if it's type TPP or Cloud, similar to
the second case of VCertTknClient, firstly it will required to create
the VCertClient passing a Config object without the Authentication
object set and then after create the Authentication object setting
into it the required credentials(user&password for TPP and APIKey for
VaaS) in order to call the VCertClient.authenticate(Authentication)
method.
With this refactoring, the sdk provides the following features which
applies for both VCertClient and VCertTknClient:
1. Ability to have the client authenticated at the creation time,
setting the Authentication object to the Config object which is passed
to the constructor of the client.
2. Ability to authenticate the client after it was created. If for
some reason it was not possible to set the Authentication object to
the client when it was created, then the authenticate(Authenticate)
method of the client can be called.1 parent a1f1284 commit aa21fa1
16 files changed
Lines changed: 1164 additions & 297 deletions
File tree
- src
- main/java/com/venafi/vcert/sdk
- connectors
- cloud
- tpp
- test
- java/com/venafi/vcert/sdk
- connectors/tpp
- resources/mappings
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| |||
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
67 | 76 | | |
68 | 77 | | |
69 | 78 | | |
| |||
124 | 133 | | |
125 | 134 | | |
126 | 135 | | |
127 | | - | |
| 136 | + | |
128 | 137 | | |
129 | | - | |
| 138 | + | |
130 | 139 | | |
131 | 140 | | |
132 | 141 | | |
133 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
134 | 163 | | |
135 | 164 | | |
136 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
0 commit comments