@@ -57,12 +57,11 @@ func (b *Backend) checkAndRotateConfigToken(ctx context.Context, request *logica
5757 return err
5858}
5959
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 ) {
6161 var name = data .Get ("config_name" ).(string )
6262 b .Logger ().Debug ("Running pathConfigTokenRotate" )
6363 var config * EntryConfig
6464 var client Client
65- var err error
6665
6766 b .lockClientMutex .RLock ()
6867 if config , err = getConfig (ctx , request .Storage , name ); err != nil {
@@ -105,6 +104,8 @@ func (b *Backend) pathConfigTokenRotate(ctx context.Context, request *logical.Re
105104 return nil , err
106105 }
107106
107+ lResp = & logical.Response {Data : config .LogicalResponseData ()}
108+ lResp .Data ["token" ] = config .Token
108109 event (ctx , b .Backend , "config-token-rotate" , map [string ]string {
109110 "path" : fmt .Sprintf ("%s/%s" , PathConfigStorage , name ),
110111 "expires_at" : entryToken .ExpiresAt .Format (time .RFC3339 ),
@@ -115,5 +116,5 @@ func (b *Backend) pathConfigTokenRotate(ctx context.Context, request *logical.Re
115116 })
116117
117118 b .SetClient (nil , name )
118- return config . Response (), nil
119+ return lResp , err
119120}
0 commit comments