// itemToUser attempts to decode the supplied `backend.Item` as
// a user resource.
itemToUser attempts to decode the supplied `backend.Item` as
a user resource.
// itemToUser attempts to decode the supplied ` backend . Item ` as // a user resource .
func itemToUser(item backend.Item) (services.User, error) {
	user, err := services.GetUserMarshaler().UnmarshalUser(
		item.Value,
		services.WithResourceID(item.ID),
		services.WithExpires(item.Expires),
	)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	if err := user.Check(); err != nil {
		return nil, trace.Wrap(err)
	}
	return user, nil
}
func itemToUser ( item backend . Item ) ( services . User , error ) { user , err := services . GetUserMarshaler ( ) . UnmarshalUser ( item . Value , services . WithResourceID ( item . ID ) , services . WithExpires ( item . Expires ) , ) if err != nil { return nil , trace . Wrap ( err ) } if err := user . Check ( ) ; err != nil { return nil , trace . Wrap ( err ) } return user , nil }
itemToUser attempts to decode the supplied `backend.Item` as
a user resource.
itemToUser attempts to decode the supplied ` backend . Item ` as a user resource .