@@ -26,14 +26,14 @@ pub enum TokenProviderError {
2626 #[ error( "actor has no roles on scope" ) ]
2727 ActorHasNoRolesOnTarget ,
2828
29- /// Application Credential used in the token is not found.
30- #[ error( "application credential with id: {0} not found" ) ]
31- ApplicationCredentialNotFound ( String ) ,
32-
3329 /// Application Credential has expired.
3430 #[ error( "application credential has expired" ) ]
3531 ApplicationCredentialExpired ,
3632
33+ /// Application Credential used in the token is not found.
34+ #[ error( "application credential with id: {0} not found" ) ]
35+ ApplicationCredentialNotFound ( String ) ,
36+
3737 /// Application credential provider error.
3838 #[ error( transparent) ]
3939 ApplicationCredentialProvider {
@@ -86,6 +86,14 @@ pub enum TokenProviderError {
8686 #[ error( "federated payload must contain idp_id and protocol_id" ) ]
8787 FederatedPayloadMissingData ,
8888
89+ /// Fernet Decryption
90+ #[ error( "fernet decryption error" ) ]
91+ FernetDecryption ( #[ from] fernet:: DecryptionError ) ,
92+
93+ /// Missing fernet keys
94+ #[ error( "no usable fernet keys has been found" ) ]
95+ FernetKeysMissing ,
96+
8997 /// Fernet key read error.
9098 #[ error( "fernet key read error: {}" , source) ]
9199 FernetKeyRead {
@@ -95,14 +103,6 @@ pub enum TokenProviderError {
95103 path : std:: path:: PathBuf ,
96104 } ,
97105
98- /// Fernet Decryption
99- #[ error( "fernet decryption error" ) ]
100- FernetDecryption ( #[ from] fernet:: DecryptionError ) ,
101-
102- /// Missing fernet keys
103- #[ error( "no usable fernet keys has been found" ) ]
104- FernetKeysMissing ,
105-
106106 #[ error( transparent) ]
107107 IdentityProvider ( #[ from] crate :: identity:: error:: IdentityProviderError ) ,
108108
@@ -157,14 +157,14 @@ pub enum TokenProviderError {
157157 #[ error( transparent) ]
158158 RevokeProvider ( #[ from] crate :: revoke:: error:: RevokeProviderError ) ,
159159
160- /// MSGPack Decryption
161- #[ error( "rmp value error" ) ]
162- RmpValueRead ( #[ from] rmp:: decode:: ValueReadError ) ,
163-
164160 /// MSGPack Encryption
165161 #[ error( "rmp value encoding error" ) ]
166162 RmpEncode ( String ) ,
167163
164+ /// MSGPack Decryption
165+ #[ error( "rmp value error" ) ]
166+ RmpValueRead ( #[ from] rmp:: decode:: ValueReadError ) ,
167+
168168 /// Target scope information is not found in the token.
169169 #[ error( "scope information missing" ) ]
170170 ScopeMissing ,
@@ -193,23 +193,23 @@ pub enum TokenProviderError {
193193 #[ error( "token has been revoked" ) ]
194194 TokenRevoked ,
195195
196- #[ error( "int parse" ) ]
197- TryFromIntError ( #[ from] TryFromIntError ) ,
198-
199196 /// Trust provider error.
200197 #[ error( transparent) ]
201198 TrustProvider ( #[ from] crate :: trust:: TrustError ) ,
202199
200+ #[ error( "int parse" ) ]
201+ TryFromIntError ( #[ from] TryFromIntError ) ,
202+
203+ #[ error( "unsupported authentication methods {0} in token payload" ) ]
204+ UnsupportedAuthMethods ( String ) ,
205+
203206 /// The user is disabled.
204207 #[ error( "user disabled" ) ]
205208 UserDisabled ( String ) ,
206209
207210 #[ error( "user cannot be found: {0}" ) ]
208211 UserNotFound ( String ) ,
209212
210- #[ error( "unsupported authentication methods {0} in token payload" ) ]
211- UnsupportedAuthMethods ( String ) ,
212-
213213 #[ error( "uuid decryption error" ) ]
214214 Uuid ( #[ from] uuid:: Error ) ,
215215
0 commit comments