@@ -46,6 +46,7 @@ pub enum TokenProviderError {
4646 #[ error( "application credential is bound to another project" ) ]
4747 ApplicationCredentialScopeMismatch ,
4848
49+ /// Assignment provider error.
4950 #[ error( transparent) ]
5051 AssignmentProvider {
5152 /// The source of the error.
@@ -57,9 +58,11 @@ pub enum TokenProviderError {
5758 #[ error( "audit_id must be urlsafe base64 encoded value" ) ]
5859 AuditIdWrongFormat ,
5960
61+ /// Authentication error.
6062 #[ error( transparent) ]
61- AuthenticationInfo ( #[ from] crate :: auth:: AuthenticationError ) ,
63+ Authentication ( #[ from] crate :: auth:: AuthenticationError ) ,
6264
65+ /// Base64 Decode error.
6366 #[ error( "b64 decryption error" ) ]
6467 Base64Decode ( #[ from] base64:: DecodeError ) ,
6568
@@ -79,10 +82,11 @@ pub enum TokenProviderError {
7982 #[ error( "token expired" ) ]
8083 Expired ,
8184
82- /// Expired token
85+ /// Expiry calculation error
8386 #[ error( "token expiry calculation failed" ) ]
8487 ExpiryCalculation ,
8588
89+ /// Federated payload missing data error.
8690 #[ error( "federated payload must contain idp_id and protocol_id" ) ]
8791 FederatedPayloadMissingData ,
8892
@@ -103,6 +107,7 @@ pub enum TokenProviderError {
103107 path : std:: path:: PathBuf ,
104108 } ,
105109
110+ /// Identity provider error.
106111 #[ error( transparent) ]
107112 IdentityProvider ( #[ from] crate :: identity:: error:: IdentityProviderError ) ,
108113
@@ -113,7 +118,7 @@ pub enum TokenProviderError {
113118 /// Unsupported token version
114119 #[ error( "token version {0} is not supported" ) ]
115120 InvalidTokenType ( u8 ) ,
116- ///
121+
117122 /// Unsupported token uuid
118123 #[ error( "token uuid is not supported" ) ]
119124 InvalidTokenUuid ,
@@ -147,9 +152,11 @@ pub enum TokenProviderError {
147152 #[ error( "project disabled" ) ]
148153 ProjectDisabled ( String ) ,
149154
155+ /// Resource provider error.
150156 #[ error( transparent) ]
151157 ResourceProvider ( #[ from] crate :: resource:: error:: ResourceProviderError ) ,
152158
159+ /// Restricted token project scoped error.
153160 #[ error( "token with restrictions can be only project scoped" ) ]
154161 RestrictedTokenNotProjectScoped ,
155162
@@ -186,33 +193,39 @@ pub enum TokenProviderError {
186193 source : std:: num:: TryFromIntError ,
187194 } ,
188195
196+ /// Token restriction not found error.
189197 #[ error( "token restriction {0} not found" ) ]
190198 TokenRestrictionNotFound ( String ) ,
191199
192- /// Revoked token
200+ /// Revoked token error.
193201 #[ error( "token has been revoked" ) ]
194202 TokenRevoked ,
195203
196204 /// Trust provider error.
197205 #[ error( transparent) ]
198206 TrustProvider ( #[ from] crate :: trust:: TrustError ) ,
199207
208+ /// Integer conversion error.
200209 #[ error( "int parse" ) ]
201210 TryFromIntError ( #[ from] TryFromIntError ) ,
202211
212+ /// Unsupported authentication methods in token payload.
203213 #[ error( "unsupported authentication methods {0} in token payload" ) ]
204214 UnsupportedAuthMethods ( String ) ,
205215
206216 /// The user is disabled.
207217 #[ error( "user disabled" ) ]
208218 UserDisabled ( String ) ,
209219
220+ /// The user cannot be found error.
210221 #[ error( "user cannot be found: {0}" ) ]
211222 UserNotFound ( String ) ,
212223
224+ /// UUID decryption error.
213225 #[ error( "uuid decryption error" ) ]
214226 Uuid ( #[ from] uuid:: Error ) ,
215227
228+ /// Validation error.
216229 #[ error( "Token validation error: {0}" ) ]
217230 Validation ( #[ from] validator:: ValidationErrors ) ,
218231}
0 commit comments