@@ -70,6 +70,7 @@ use crate::core::compiler::rustdoc::RustdocExternMap;
70
70
use crate :: core:: shell:: Verbosity ;
71
71
use crate :: core:: { features, CliUnstable , Shell , SourceId , Workspace , WorkspaceRootConfig } ;
72
72
use crate :: ops:: { self , RegistryCredentialConfig } ;
73
+ use crate :: util:: auth:: Secret ;
73
74
use crate :: util:: errors:: CargoResult ;
74
75
use crate :: util:: validate_package_name;
75
76
use crate :: util:: CanonicalUrl ;
@@ -137,24 +138,15 @@ enum WhyLoad {
137
138
}
138
139
139
140
/// A previously generated authentication token and the data needed to determine if it can be reused.
141
+ #[ derive( Debug ) ]
140
142
pub struct CredentialCacheValue {
141
143
/// If the command line was used to override the token then it must always be reused,
142
144
/// even if reading the configuration files would lead to a different value.
143
145
pub from_commandline : bool ,
144
146
/// If nothing depends on which endpoint is being hit, then we can reuse the token
145
147
/// for any future request even if some of the requests involve mutations.
146
148
pub independent_of_endpoint : bool ,
147
- pub token_value : String ,
148
- }
149
-
150
- impl fmt:: Debug for CredentialCacheValue {
151
- /// This manual implementation helps ensure that the token value is redacted from all logs.
152
- fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
153
- f. debug_struct ( "CredentialCacheValue" )
154
- . field ( "from_commandline" , & self . from_commandline )
155
- . field ( "token_value" , & "REDACTED" )
156
- . finish ( )
157
- }
149
+ pub token_value : Secret < String > ,
158
150
}
159
151
160
152
/// Configuration information for cargo. This is not specific to a build, it is information
0 commit comments