@@ -57,12 +57,11 @@ func (b *Backend) checkAndRotateConfigToken(ctx context.Context, request *logica
57
57
return err
58
58
}
59
59
60
- func (b * Backend ) pathConfigTokenRotate (ctx context.Context , request * logical.Request , data * framework.FieldData ) (* logical.Response , error ) {
60
+ func (b * Backend ) pathConfigTokenRotate (ctx context.Context , request * logical.Request , data * framework.FieldData ) (lResp * logical.Response , err error ) {
61
61
var name = data .Get ("config_name" ).(string )
62
62
b .Logger ().Debug ("Running pathConfigTokenRotate" )
63
63
var config * EntryConfig
64
64
var client Client
65
- var err error
66
65
67
66
b .lockClientMutex .RLock ()
68
67
if config , err = getConfig (ctx , request .Storage , name ); err != nil {
@@ -105,6 +104,8 @@ func (b *Backend) pathConfigTokenRotate(ctx context.Context, request *logical.Re
105
104
return nil , err
106
105
}
107
106
107
+ lResp = & logical.Response {Data : config .LogicalResponseData ()}
108
+ lResp .Data ["token" ] = config .Token
108
109
event (ctx , b .Backend , "config-token-rotate" , map [string ]string {
109
110
"path" : fmt .Sprintf ("%s/%s" , PathConfigStorage , name ),
110
111
"expires_at" : entryToken .ExpiresAt .Format (time .RFC3339 ),
@@ -115,5 +116,5 @@ func (b *Backend) pathConfigTokenRotate(ctx context.Context, request *logical.Re
115
116
})
116
117
117
118
b .SetClient (nil , name )
118
- return config . Response (), nil
119
+ return lResp , err
119
120
}
0 commit comments